consolelog.tools

ASCII Converter

Convert text to character codes in decimal, hex, octal or binary — and decode any of them back. Code-point-correct (emoji & CJK safe), tolerant of prefixes & separators. Live, with a character inspector.

About this ToolHow it works, benefits & use cases

Turn text into numeric character codes — and decode codes back into text — in your choice of base. Encode each character to decimal (65), hexadecimal (41), octal (101), or binary (1000001), then format the list with a space, comma, newline, or no separator, optionally zero-padded to a fixed width and optionally prefixed with 0x, 0o, or 0b. The conversion is code-point-correct, so emoji and CJK characters are handled by their actual code point rather than being truncated. Decoding is tolerant: it splits on whitespace or commas, honors per-token 0x/0o/0b and \x prefixes (un-prefixed tokens use the base you select), skips invalid or out-of-range tokens while still decoding the rest, and names what it skipped. A live character inspector table lists each character with its decimal, hex, octal, and binary values plus its ASCII control name (NUL, TAB, SP, DEL, …). It all runs in your browser.

How to Use

  1. 1Choose "Encode (text → codes)" or "Decode (codes → text)" with the toggle.
  2. 2In Options pick the Base (decimal, hex, octal, or binary); when encoding also pick a Separator and optionally enable Zero-pad and Base prefix.
  3. 3Type or paste your text (or codes) — when encoding, the codes and a per-character inspector update live.
  4. 4When decoding, paste numbers with any mix of 0x/0o/0b/\x prefixes; un-prefixed tokens are read in the selected base.
  5. 5Click Convert, then copy, download, swap input ↔ output, or share the link.

Key Benefits

  • Four bases for output: decimal, hexadecimal, octal, and binary
  • Separator choices (space, comma, newline, none) plus optional zero-padding
  • Optional 0x / 0o / 0b prefixes on encoded values
  • Code-point-correct — emoji and CJK encode by their true code point
  • Tolerant decoder honors per-token prefixes and skips invalid tokens, naming them
  • Live character inspector with decimal, hex, octal, binary, and control names
  • Two-way conversion with swap and a shareable URL

Common Use Cases

  • Listing the decimal or hex codes of each character in a string
  • Producing a binary or octal representation of text for low-level work
  • Decoding a list of character codes copied from a forum or source file
  • Looking up the control-character names (NUL, TAB, CR …) of bytes
  • Mixing prefixed tokens (0x48, 0b1001000) in one decode pass

Options

Fixed width (dec 3, hex 2, oct 3, bin 8)

Prepend 0x / 0o / 0b (hex / oct / bin)

0 characters · live

Enter text above to see its character codes.

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Related tools