How Base Converter works
Type a number in any base, with or without a 0x, 0b or 0o prefix, and see it in binary, octal, decimal, hex and a base you choose. Pick a width to see the two's complement pattern, then try a bitwise operation against a second value.
Uses BigInt for exact arithmetic at any size, masks results to 8, 16, 32 or 64 bits, and reads signed values from the top bit.
Questions
- Does it handle numbers larger than 64 bits?
- Yes. Conversion uses BigInt, so size is not limited. Two's complement and bitwise operations are shown at 8, 16, 32 or 64 bits.
- How do prefixes work?
- 0x means hex, 0b binary and 0o octal. A prefix overrides the input base menu.
- What is two's complement?
- It is how most computers store signed integers. The top bit marks a negative number, and -1 is all ones, so -1 in 8 bits is 11111111, or 0xFF.
- Is anything sent to a server?
- No. Everything runs in your browser.
More Text & Data tools
- .env InspectorInspect, mask, and convert env files
- JSONPath ExplorerPull a value out of JSON by path
- cURL → fetchConvert curl commands to fetch()
- Markdown PreviewerLive GitHub-flavored markdown
- JSON FormatterValidate and pretty-print
- Base64Encode and decode
- Diff CheckerCompare two text blocks
- Word CountCount, readability, stats
- TimestampUnix, ISO 8601, relative time
- Hash GeneratorSHA-1, SHA-256, SHA-512
- URL EncoderEncode, decode, parse URLs
- Text CaseUPPER, lower, Title, camelCase, more
- Character EntitiesHTML entities, Unicode, ASCII lookup
- JSON to TypeScriptGenerate TypeScript interfaces from JSON
- JWT DecoderInspect JSON Web Tokens
- Page WeightWeigh a page: bytes, grade, Core Web Vitals, HAR diff
- SQL Viewer & CopyOpen a .sql file, read it, copy it
- SQL Formatter & MinifyBeautify or compact SQL
- SQL SplitterSplit a migration into statements
- SQL Pre-flight CheckCatch RLS gaps & risky SQL
- Unicode InspectorCode points, bytes, invisible characters