Code tool

Invert a Binary String

Enter a string containing only 0 and 1 to invert each bit locally in your browser.

In-browser processingNo account requiredPrivacy details ↗

Use only 0 and 1. The output keeps the same length.

Use only 0 and 1. The output keeps the same length.

A QUICK WALKTHROUGH

How to use this tool

  1. Enter a non-empty binary string containing only 0 and 1.
  2. Select Invert binary string.
  3. Copy the inverted string if needed.

String-based operation

The tool changes characters directly and does not interpret the input as a signed or unsigned number.

Local and exact

Leading zeroes remain represented in the output, and processing happens locally in your browser.

GOOD TO KNOW

Common questions

Does it accept spaces?

No. Enter a non-empty string containing only 0 and 1.

Are leading zeroes preserved?

Yes. The output has exactly the same length as the input.