UTILSBOX⚡ALL TOOLS54+
JSON.FORMATHub of five tools: format, validate, minify, convert to XML, and compare two JSON documents.//REGEX.TESTERReal-time regular expressions tester, cheatsheet, debugger and replacer.//PDF.SUITEMerge, split, extract text, rotate and convert PDF pages to images.//IMAGE.STUDIOIn-browser photo editor: crop, resize, filters, WebP/PNG and Base64 encoder.//HTML.BEAUTIFYHTML code beautifier, production minifier and entity encoder.//CSS.MINIFYCSS code formatter, production stylesheet minifier and CSS to SCSS converter.//SQL.FORMATTERSQL query beautifier, dialect translator (Postgres/MySQL) and minifier.//SVG.EXCALIDRAWInteractive vector visual editor powered by Excalidraw and SVG formatter.//TEXT.DIFFWord counter, reading time estimator and dual-text diff comparator.//YAML.CONVERTYAML & JSON bi-directional validator and formatter with syntax checking.//XML.PARSERXML document formatter, tree inspector and XML to JSON converter.//GRAPHQL.STUDIOGraphQL query & SDL formatter, minifier, AST field sorter and validator.//BASE64.CODECBase64 and URL-Safe encoder / decoder with full UTF-8 verification.//PASSWORD.GENCryptographically secure random password and entropy strength generator.//URL.STUDIO8-tool URL suite: encode, decode, validator, component parser and builder.//QR.STUDIOCustom QR code generator with embedded logos, colors, gradients and shapes.//ASCII.EXPLORERInteractive ASCII 0-255 table, Alt keyboard codes and CP437 symbols.//KEYCODES.LIVELive KeyboardEvent detector and JavaScript keycodes cheat sheet.//JWT.DEBUGGERJWT token decoder, claims inspector and Web Crypto signature verification.//BINARY.CODECBidirectional text to binary converter with digital rain and ASCII table.//CHARTS.STUDIOInteractive chart generator (bars, lines, pie, scatter) from CSV data.//UUID.V7Bulk generator for UUID v4, time-ordered v7, v1 and live UUID validator.//CSV.JSONBi-directional CSV to JSON converter with custom delimiters & table grid.//COLORS.STUDIOHEX/RGB/HSL/CMYK converter, palette harmonies and WCAG 2.1 contrast tester.//SEO.METASEO Meta Tags, Open Graph cards and real-time Google SERP card preview.//SCHEMA.JSONLDSchema.org JSON-LD structured data generator for Google Rich Snippets.//SITEMAP.XMLStandard XML Sitemap generator (Protocol 0.9) for Google Search Console.//ROBOTS.TXTRobots.txt generator, AI scraper blocking presets and live URL rule tester.//FAKE.DATASynthetic mock data generator: export records to JSON, CSV, SQL and TypeScript.//CLOCK.WORLDReal-time world clock with 3D holographic globe and 174 country timezones.//DATE.CALCDays between dates, exact age, business days, Unix timestamp and cron parser.//CALC.SUITESuite of 56+ online calculators: percentage, mortgage, loan, VAT, BMI & salary.//JSON.FORMATHub of five tools: format, validate, minify, convert to XML, and compare two JSON documents.//REGEX.TESTERReal-time regular expressions tester, cheatsheet, debugger and replacer.//PDF.SUITEMerge, split, extract text, rotate and convert PDF pages to images.//IMAGE.STUDIOIn-browser photo editor: crop, resize, filters, WebP/PNG and Base64 encoder.//HTML.BEAUTIFYHTML code beautifier, production minifier and entity encoder.//CSS.MINIFYCSS code formatter, production stylesheet minifier and CSS to SCSS converter.//SQL.FORMATTERSQL query beautifier, dialect translator (Postgres/MySQL) and minifier.//SVG.EXCALIDRAWInteractive vector visual editor powered by Excalidraw and SVG formatter.//TEXT.DIFFWord counter, reading time estimator and dual-text diff comparator.//YAML.CONVERTYAML & JSON bi-directional validator and formatter with syntax checking.//XML.PARSERXML document formatter, tree inspector and XML to JSON converter.//GRAPHQL.STUDIOGraphQL query & SDL formatter, minifier, AST field sorter and validator.//BASE64.CODECBase64 and URL-Safe encoder / decoder with full UTF-8 verification.//PASSWORD.GENCryptographically secure random password and entropy strength generator.//URL.STUDIO8-tool URL suite: encode, decode, validator, component parser and builder.//QR.STUDIOCustom QR code generator with embedded logos, colors, gradients and shapes.//ASCII.EXPLORERInteractive ASCII 0-255 table, Alt keyboard codes and CP437 symbols.//KEYCODES.LIVELive KeyboardEvent detector and JavaScript keycodes cheat sheet.//JWT.DEBUGGERJWT token decoder, claims inspector and Web Crypto signature verification.//BINARY.CODECBidirectional text to binary converter with digital rain and ASCII table.//CHARTS.STUDIOInteractive chart generator (bars, lines, pie, scatter) from CSV data.//UUID.V7Bulk generator for UUID v4, time-ordered v7, v1 and live UUID validator.//CSV.JSONBi-directional CSV to JSON converter with custom delimiters & table grid.//COLORS.STUDIOHEX/RGB/HSL/CMYK converter, palette harmonies and WCAG 2.1 contrast tester.//SEO.METASEO Meta Tags, Open Graph cards and real-time Google SERP card preview.//SCHEMA.JSONLDSchema.org JSON-LD structured data generator for Google Rich Snippets.//SITEMAP.XMLStandard XML Sitemap generator (Protocol 0.9) for Google Search Console.//ROBOTS.TXTRobots.txt generator, AI scraper blocking presets and live URL rule tester.//FAKE.DATASynthetic mock data generator: export records to JSON, CSV, SQL and TypeScript.//CLOCK.WORLDReal-time world clock with 3D holographic globe and 174 country timezones.//DATE.CALCDays between dates, exact age, business days, Unix timestamp and cron parser.//CALC.SUITESuite of 56+ online calculators: percentage, mortgage, loan, VAT, BMI & salary.//
MODULE 20 · ENCODE

Binary Converter

Convert plain text to binary code and binary back to text in real-time — byte by byte, UTF-8, 100% in your browser.

Output format
InputPLAIN TEXT
13 chars
Result13 bytes · 104 bits
// Technical guide & specifications

Technical guide: binary notation, radix conversion and UTF-8 encoding

How a byte value is computed, how negative numbers are represented, and why one accented letter needs more than 8 bits.

1. Positional weights and converting between base 2, 10 and 16

Binary is a positional base-2 system: inside a byte each bit carries a power of two, with weights 128, 64, 32, 16, 8, 4, 2 and 1 from left to right. That is why 01000001 reads as 64 + 1 = 65 in decimal, which is the letter "A" in the ASCII table and 0x41 in hexadecimal. Converting to hex is mechanical because every 4-bit group (a nibble) maps to one hex digit: 0100 is 4 and 0001 is 1. A single byte spans 256 values (0-255) and exactly two hex digits, which is why memory dumps, CSS colors (#FF8800) and MAC addresses are written in hexadecimal instead of binary.

2. Signed integers and two’s complement

Signed integers are stored in two’s complement, where the most significant bit carries a negative weight of -2^(N-1). In an 8-bit integer, 11111111 is not 255 but -1, and the range runs from -128 to 127. To negate a value, invert every bit and add 1: 00000101 (5) becomes 11111010 + 1 = 11111011 (-5). The scheme removes the duplicate negative zero and lets an ALU subtract using the same adder circuit it uses to add. It also explains the classic overflow bug: adding 1 to 01111111 (127) yields 10000000, which reads back as -128. The byte 0xFF means 255 unsigned and -1 signed; only the declared type decides.

3. 7-bit ASCII versus variable-length UTF-8

ASCII defines only 128 code points in 7 bits, so everything else relies on UTF-8, a variable-length encoding that announces its length in the leading bits: 0xxxxxxx for one byte, 110xxxxx 10xxxxxx for two, 1110xxxx for three and 11110xxx for four. "é" (U+00E9) becomes 11000011 10101001 (0xC3 0xA9), the ideograph 中 (U+4E2D) takes three bytes, and an emoji such as 😀 (U+1F600) takes four. Do not confuse characters with bytes: in JavaScript "😀".length returns 2 because strings are UTF-16 and the emoji is stored as a surrogate pair, while its UTF-8 binary form is 32 bits long.

// Architecture & best practices

❓ Frequently asked questions about binary conversion

Why does my binary string fail to decode into text?

Usually because the digit count is not a multiple of 8. If you copied 7-bit ASCII groups or a leading zero was dropped, every byte after that point is misaligned. Also check for stray characters that are neither 0 nor 1, and when the text contained accents or emoji, make sure all 2 to 4 UTF-8 bytes of each character are present.

Why do accented characters come out as "é"?

That is mojibake: the two UTF-8 bytes of "é" (0xC3 0xA9) are being read as two separate Latin-1 characters, Ã and ©. The binary is correct; the encoding declared on the decoding side is not. Force UTF-8 at the destination, for example with <meta charset="utf-8"> or charset=utf-8 in the Content-Type header.

Does endianness affect text-to-binary conversion?

Not for UTF-8: its byte sequence is fixed by the standard and reads identically on x86, ARM or any other architecture, which is why it needs no BOM. It does matter for UTF-16 and UTF-32, where FE FF or FF FE marks the order, and for multi-byte integers: 0x41424344 is stored as 44 43 42 41 on little-endian x86 and as 41 42 43 44 in big-endian network order.

Related data and encoding tools