Convert ASCII to Arbitrary Base

Convert ASCII to Arbitrary Base text to numeric strings in any base (2-36) - choose separator, uppercase, zero-pad, and prefix. Free, client-side, instant, offline.

Encode text β€” ASCII, Latin-1, CJK, or emoji β€” into numeric strings in any base from 2 to 36. Pick the separator, case, zero-padding, and an optional per-token prefix like 0x.

How to Use Convert ASCII to Arbitrary Base

  1. Type or paste text into the input - plain ASCII, Latin characters, CJK, and emoji are all accepted. Iteration uses code-point awareness, so πŸ˜€ stays one token.
  2. Pick the target base (2-36). The classic choices are 2 for binary, 8 for octal, 10 for decimal, and 16 for hex, but base 32 and 36 are compact options for IDs.
  3. Choose a separator: a single space works for casual reads, comma + space suits CSV pastes, newline gives one token per line, pipe highlights token boundaries, and dash produces `48-65-6C-6C-6F` style fingerprints.
  4. Toggle case (UPPER or lower) - only matters for bases above 10 where letters appear. Hex typically looks cleaner in uppercase but many style guides prefer lowercase.
  5. Set a zero-pad width (0 turns padding off). Use 8 for byte-aligned binary (01001000), 2 for paired-hex dumps (48 65), or whatever keeps your columns tidy.
  6. Add a per-token prefix if the target language needs one - 0x for C/JavaScript hex literals, 0b for binary literals, or a language-specific marker.
  7. Copy, Download, or press Ctrl+Enter (⌘+Enter on Mac) to run the encode and copy the result in one shortcut. Reset restores the defaults without losing the input.

Frequently asked questions

What is arbitrary-base encoding?

Writing each character as the digits of a numeric system you choose. Binary (base 2), hex (base 16), and base 36 are the most common, but the tool supports every integer base from 2 up to 36.

Which bases are supported?

Every integer base from 2 to 36 inclusive. The digits used are 0-9 plus a-z – base 36 therefore uses the full ASCII alphabet of digits.

What is the default base?

Base 16 (hexadecimal). It is the most common representation for ASCII bytes and the zero-click starting point on page load.

Is my data secure?

Yes. Encoding runs entirely in your browser – nothing is uploaded, cached, or tracked. After the page loads you can disconnect the network and keep encoding indefinitely.

Why would I use this tool?

Debug custom wire formats, generate compact IDs, feed hex dumps into embedded firmware, or craft test fixtures where a specific base is required. The per-token prefix and zero-pad knobs cover most style-guide requirements.

Does it work offline?

Yes. HTML, CSS, and JavaScript are self-contained. Once the page has loaded, you can turn off Wi-Fi and keep encoding – useful on air-gapped machines.

Is it free?

Yes, 100% free with no cap on input length or number of encodes. No sign-up, no premium tier, no watermark.

Does it handle emoji and CJK properly?

Yes. Iteration uses Array.from (code-point aware) and encoding uses codePointAt(0), so πŸ˜€ emits 1F600 as a single token rather than the surrogate halves D83D DE00. CJK characters like δΈ­ become 4E2D in hex.

What output separators can I pick?

Space (default), comma + space, newline, pipe with spaces, or dash. The separator only goes between tokens – the output never starts or ends with one.

How do I decode back to text?

Use the sibling Arbitrary Base to ASCII converter. Round-trip is exact – emoji encoded here with base 10 (e.g. πŸ˜€ β†’ 128512) decode back to the original character there.