EditSafely

Convert a String to Binary

Quickly convert a string to binary values.

Runs on your device, nothing uploaded

Separator
Try:

0 chars · 0 lines

Output

Quickly convert a string to binary values.

Type or paste above to see the result here.

Example: Encode

What you paste never leaves this tab

Convert a String to Binary is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, whatever you type in is sent to a server that can log it, cache it or keep it. Here it is read and transformed inside this tab and nowhere else.

  • No upload
  • No length limit
  • Works offline once loaded
  • Nothing stored or logged

How to use Convert a String to Binary

  1. 1. Paste the string. Enter any string. Each character is encoded as its UTF-8 bytes, eight bits each, and the byte map shows which bytes belong to which character. Turn on Read escape sequences for a string copied from code, so A\n becomes the two bytes 01000001 00001010 instead of three characters.
  2. 2. Adjust the Separator. The Separator option controls what goes between encoded bytes. Keep the default space for readability, use nothing for one continuous stream, or set a comma when the output feeds an array literal.
  3. 3. Copy the binary output. Grab the encoded result, such as 01001000 01101001 for 'Hi', and paste it wherever the bits need to go: a puzzle, a lesson or a test vector.

When to use Convert a String to Binary

Convert a String to Binary turns readable text into the zeros and ones that actually sit in memory. It is the go-to tool when you want to see or share the raw encoded form of a message, whether that is for teaching character encodings, hiding a note in plain sight or generating fixtures.

  • Creating a hidden message. Binary-encoded text is a classic for treasure hunts, escape rooms and geeky greeting cards. Encode your sentence here and print the bits; solvers decode it back for the payoff.
  • Demonstrating character encoding in class. Encoding a student's own name makes the byte-per-character idea concrete, and comparing uppercase against lowercase shows only a single bit flipping in each letter.
  • Building parser test data. A tokenizer that operates on raw bit input needs known strings as fixtures. Encode the strings with a comma separator to paste directly into your test arrays.
  • Double-checking an encoder implementation. Your own string-to-bits routine produces output you do not fully trust. Encode the same sample here and diff the two results to catch off-by-one or ordering bugs.

Examples

Encode

Input

Hi

Output

01001000 01101001

Escape sequences from code

Input

A\n

Output

01000001 00001010

A multi-byte character

Input

€

Output

11100010 10000010 10101100

About the Convert a String to Binary tool

Convert a String to Binary runs as plain JavaScript in your browser tab, with no server behind it. Quickly convert a string to binary values. Whatever you put in stays on your device from start to finish.

The tool is part of EditSafely's Binary Tools section, 112 single-purpose utilities built around the same idea: open the page, get the result, keep your data to yourself.

You can shape the output with 2 settings, including Separator and Read escape sequences (\n, \t, \x41, \u00e9), and the result refreshes the moment you change one. 3 worked examples further down the page show exactly what the tool produces for real inputs.

That local-first design has practical benefits beyond privacy. The tool keeps working on a flaky connection once the page has loaded, results are instant because nothing round-trips to a server, and it is safe to use with confidential material.

Frequently asked questions

Does Convert a String to Binary cost anything?

Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.

Is it safe to paste sensitive or confidential data?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

How much text can I process at once?

There is no fixed limit; your device's memory is the ceiling. Up to 10 MB the result updates as you type, after a short pause that grows with the size. Above 10 MB a Run button appears so typing stays smooth, and files open up to 50 MB. A very long result shows its first 2,000 lines on screen, while Copy and Download always include all of it.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

How do I use the result?

The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.