Text Encoding Converter
Convert text to Binary, ASCII decimal codes, or Hexadecimal — and back. Three encoding modes in one tool, all running entirely in your browser.
About Text Encoding Converter
This tool converts text between plain characters and three common numeric encodings: binary (base 2), ASCII decimal codes (base 10), and hexadecimal (base 16). All three represent the same underlying byte values — just in different number systems.
Encoding Types Explained
Binary — Each character is shown as 8 bits (e.g. 'H' = 01001000). Used in computer science education and low-level data representation. · ASCII Decimal — Each character is its decimal ASCII code (e.g. 'H' = 72). Used in programming when inspecting character values. · Hexadecimal — Each character is its hex byte (e.g. 'H' = 48). Used extensively in debugging, memory inspection, color codes, and network protocols.
How to Use
- Enter or paste your text in the Input area.
- Select the From Encoding (source) and To Encoding (target).
- Click Convert — the converted text appears in the output.
- Click Copy to copy the result.
How It Works
The tool uses the browser's TextEncoder and TextDecoder APIs to encode text as bytes in the source encoding, then decode those bytes using the target encoding. This handles differences in character mappings between encodings.
Example
Convert a legacy Windows-1252 encoded string (common in older European documents) to UTF-8 for modern web use. Characters like é, ü, and ñ that were stored as single bytes get properly mapped to their UTF-8 multi-byte representations.