How to use the Text Code Converter
Convert text to character codes or decode codes as text. Choose Decimal, Hexadecimal, Binary, or Octal, then choose a direction. The initial settings are Binary, Space, Zero-pad, and Text → Code.
Choose the conversion settings
- Use Base to select Decimal, Hexadecimal, Binary, or Octal.
- Select Text → Code to encode characters, or Code → Text to decode numeric values.
- Set Separator to Space, Comma, or None. In Code → Text with Decimal selected, None is disabled and changes to Space.
- Enable Prefix (0x / 0b / 0o) when you want base prefixes in the encoded output. During decoding, prefixes are removed only for the selected base; hexadecimal input recognizes both
0xand\x. - Use Zero-pad to change the encoded output to fixed-width values. It does not change how separated values are decoded.
- Use Uppercase (hex) for uppercase hexadecimal output. This control is available only with Hexadecimal selected.
Convert text or code
- Enter text or numeric codes in the left input field. You can also load a text file.
- Choose the base, direction, separator, and formatting options.
- Read the result in the read-only output field. For example, with Zero-pad off, decimal A is
65; with Prefix (0x / 0b / 0o) enabled, hexadecimal A is0x41. Binary can show01000001with Zero-pad on, and octal can show0o101with its prefix and fixed-width padding enabled.
If the input cannot be split or parsed, the output shows a parse error. The decoder does not fully validate that every token uses only valid digits for the selected base or that every value is a valid Unicode code point.
Use the file and output controls
- Choose Upload to select a
.txtfile. You can also drop a file onto the input area. - Choose Copy to write the output to the clipboard.
- Choose Download to save the plain-text result as
text-code-converter-output.txt.
Review the conversion details
Per-Character Breakdown shows Char, Decimal, Hex, Binary, and Octal columns. It appears after a successful conversion with non-empty text, up to 200 Unicode code points. It is hidden for decoding errors and longer text. Scroll the table vertically to review its rows.
Use Bit-Flipper in Binary mode
Select Binary to show the separate Bit-Flipper panel. Its field is limited by maxlength="32" UTF-16 code units, and the script renders at most 32 Unicode code points. Some emoji use more than one UTF-16 code unit. Enter text in that field, then click a bit button to flip it and update the decoded result. A code point above 255 can produce more than eight buttons.
Limitations and data handling
- With Separator set to None, non-decimal input is split into fixed-width chunks: 8 binary digits, 2 hexadecimal digits, or 3 octal digits. Decimal None input cannot be split reliably.
- Encoding with None and Zero-pad disabled can create an ambiguous stream. Use a separator or fixed-width output when the values must be decoded again.
- Malformed or partly valid tokens may not be rejected completely because parsing uses JavaScript's numeric conversion. Out-of-range code points can produce empty output.
- The conversion and Bit-Flipper logic runs in the browser. The inspected page files do not establish a broader guarantee about third-party analytics or all other data transmission on the page.
Frequently asked questions
What bases can I convert between?
You can convert between Decimal (base 10), Hexadecimal (base 16), Binary (base 2), and Octal (base 8). Choose a base and then select Text → Code or Code → Text.
What is the Bit-Flipper?
The Bit-Flipper is a separate panel that appears when Binary is selected. Its field is limited by maxlength="32" UTF-16 code units, and the script renders at most 32 Unicode code points. Some emoji can use more than one UTF-16 code unit. It shows clickable bits for each Unicode code point; values above 255 can produce more than eight buttons.
Does this handle emoji and other Unicode characters correctly?
The converter reads JavaScript strings by Unicode code point, so emoji and other characters represented by surrogate pairs are processed as one code point rather than two UTF-16 code units.
Is my data sent to a server?
The converter's conversion, decoding, and bit-flipping logic runs in your browser. The inspected page files do not establish a broader guarantee about third-party analytics or all other data transmission on the page.