Text tool

Extract Substring

Take the same character range from a phrase or every line while choosing whether “character” means a displayed grapheme or a Unicode code point.

In-browser processingNo account requiredPrivacy details ↗

Maximum 100,000 characters. LF line breaks are preserved in per-line mode.

1-based: position 1 selects the first unit.

Use 0 for an intentionally empty result.

Preserves the number and order of LF-separated lines, including empty lines.

Reversal uses the selected index unit.

A QUICK WALKTHROUGH

How to use this tool

  1. Enter text up to 100,000 characters.
  2. Choose the 1-based start position, extraction length, index unit, per-line processing, and optional reversal.
  3. Extract the substring, review empty or shortened results, then copy it or download a text file.

Defined 1-based range behavior

Start position 1 selects the first unit. Length 0 intentionally returns an empty substring. A range that reaches past the end returns the available remainder, while a start beyond the text returns an empty result. Negative, decimal, or excessively large values are rejected rather than silently changed.

Choose a Unicode index unit

Displayed-grapheme mode uses browser grapheme segmentation so combining marks, flags, emoji modifiers, and ZWJ sequences stay intact. Code-point mode exposes the underlying Unicode scalar sequence and can separate those components. Per-line mode applies the same range independently to every LF-separated line and preserves empty lines; optional reversal uses the selected unit.

GOOD TO KNOW

Common questions

Why is the first position 1 instead of 0?

The user-facing range is deliberately 1-based: position 1 means the first selected unit. The result message repeats the position and unit used.

What happens when the requested length is too large?

The tool returns every available unit from the start position to the end. It does not add padding.

Can this split an emoji?

Displayed-grapheme mode keeps a visible emoji sequence together. Code-point mode can expose and separate the code points inside a flag, modifier sequence, or joined emoji.