QuickFreeTools

Online Extract Text Fragment

Extract a substring from text by start position and length (or end position). Useful for snipping a fixed-length fragment from long text. Client-side only.

Frequently Asked Questions

How are positions counted?
Start position is 0-based: 0 = first character, 1 = second, etc. Length is the number of characters to take. Alternatively use start and end index.
What if start is beyond the text?
You get an empty string. If start + length exceeds the end, you get from start to the end of the text.
Can I use negative indices?
Depending on implementation, negative start might mean 'from end'; e.g. -1 as last character. Check the tool's options.

Related Text Tools