EditSafely

Slice Binary Values

Extract a part of a binary number.

Runs on your device, nothing uploaded

Start
Length
Count from
Apply to
Try:

0 chars · 0 lines

Output

Extract a part of a binary number.

Type or paste above to see the result here.

Example: Slice

What you paste never leaves this tab

Slice Binary Values 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 Slice Binary Values

  1. 1. Paste the binary string. Enter the values to cut a piece from, one per line or separated by spaces, such as 1010110011110000. Each value is sliced on its own; Apply to Whole input as one stream joins everything first.
  2. 2. Set Start and Length. Start is where the slice begins, counted from 0, and Length is how many bits to take, so Start 0 with Length 8 on the example gives the first byte, 10101100. Count from Right measures Start from the last bit. One value shows a ruler with the slice highlighted, and a start past the end is reported for that line only.
  3. 3. Copy the extracted piece. Copy the slice from the output pane and use it as its own value. Adjust Start to step the same window across the input, byte by byte or field by field.

When to use Slice Binary Values

Slice Binary Values cuts a contiguous run of bits out of a longer binary string, like substring for base 2. Packed words, protocol headers and register dumps all embed fields at known offsets, and counting to position 23 by eye is where mistakes happen. Specify Start and Length instead and get the exact field.

  • Pulling a field from a packed header. An IPv4 header diagram says the TTL occupies a known offset. Slice those eight bits out of the captured binary and decode just the field you are investigating.
  • Splitting an instruction encoding. Disassembling by hand means separating opcode, register and immediate fields. Slice each region from the 32-bit instruction word using the offsets in the ISA manual.
  • Auditing a bitfield struct layout. A C struct packs several bitfields and you suspect the compiler laid them out unexpectedly. Slice the dumped word at each declared offset and compare against the values you stored.
  • Extracting a window for comparison. Two long captures differ somewhere in the middle. Slice the same Start and Length from both and diff the short windows instead of scanning full-length strings.

Examples

Slice

Input

1010110011110000

Output

10101100

Slice each value

Input

1010 1100

Output

10 11

Join, then slice

Input

1010 1100

Output

1011

About the Slice Binary Values tool

Slice Binary Values runs as plain JavaScript in your browser tab, with no server behind it. Extract a part of a binary number. 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 4 settings, including Start, Length, Count from and Apply to, 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 Slice Binary Values 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.