onlinetexttools logo

Text fragment extractor

World's simplest text tool

World's simplest browser-based utility for extracting text fragments. Load your text in the input form on the left and you'll automatically get a snippet of the given length on the right. Powerful, free, and fast. Load text – get subtext. Created by developers from team Browserling.
announcement a new site!
We just launched a new site – Online Unicode Tools – utilities for working with Unicode. Check it out!
Starting Position
Start extracting a fragment of text from this position.
Fragment Length
Crop this many characters from the text.
Line-by-line Mode
Get a fragment from each input text line.
Text fragment extractor tool What is a text fragment extractor?
With this online program, you can extract a smaller text fragment from the given text. You can specify the length of the snippet in the options, as well as indicate the position from which to start the extraction. The starting position can be either a positive number or a negative number. The difference is that for positive positions, the characters are counted from the left side to the right side and for negative positions they are counted from the right side to the left side. The length can also be a positive number or a negative number. In case of a positive length, the fragment is extracted to the right side relative to the starting position but in case of a negative length, the fragment is extracted to the left side relative to the starting position. You can also leave the length field empty and then the snippet will be extracted from the starting position to the end of the text. If you enter the "-" symbol in the length field, then the fragment will be extracted from the beginning of the text to the starting position. If your text consists of several lines, you can extract a snippet from each line. Enable the option "Line-by-line" to extract individual fragments from each line. Textabulous!
Text fragment extractor examples Click to use
Extract a Text Snippet
In this example, we extract a text fragment with a length of 90 characters. The snippet starts from the 5th position and ends with the 94th position.
The tea plant grows best in tropical and temperate places where rain falls throughout the year. Tea can be grown from sea level to about 2,000 meters, but the best quality grows in higher regions.
tea plant grows best in tropical and temperate places where rain falls throughout the year
Required options
These options will be used automatically if you select this example.
Start extracting a fragment of text from this position.
Crop this many characters from the text.
Get a fragment from each input text line.
An Interesting Fact
In this example, we specify only the starting crop position and do not set the length value. In this case, the application cuts the text from the specified start point to the last character of the text. In the output, we get a subtext of the original text from the twentieth symbol to the end of the sentence.
The entire world's population could fit inside Los Angeles.
population could fit inside Los Angeles.
Required options
These options will be used automatically if you select this example.
Start extracting a fragment of text from this position.
Crop this many characters from the text.
Get a fragment from each input text line.
Class Timetable
This example uses the line-by-line option to extract multiple snippets from a class timetable. It uses a negative start value of -15. This means that the starting position is the 15th character from the end. It sets the length field to the value "-". This means that the fragment is extracted from the starting point back to the first symbol of the text. The result is an ordered list of only the class names.
1. English 09:00 – 10:30 2. Break 10:30 – 10:45 3. Math 10:45 – 12:30 4. Lunch 12:30 – 13:30 5. History 13:30 – 15:00 6. Break 15:00 – 15:15 7. Sport 15:15 – 16:45
1. English 2. Break 3. Math 4. Lunch 5. History 6. Break 7. Sport
Required options
These options will be used automatically if you select this example.
Start extracting a fragment of text from this position.
Crop this many characters from the text.
Get a fragment from each input text line.
Pro tips Master online text tools
You can pass input to this tool via ?input query argument and it will automatically compute output. Here's how to type it in your browser's address bar. Click to try!
https://onlinetexttools.com/extract-text-fragment?input=The%20tea%20plant%20grows%20best%20in%20tropical%20and%20temperate%20places%20where%20rain%20falls%20throughout%20the%20year.%20Tea%20can%20be%20grown%20from%20sea%20level%20to%20about%202%2C000%20meters%2C%20but%20the%20best%20quality%20grows%20in%20higher%20regions.&start=5&length=90&multi-line=false
All text tools
Didn't find the tool you were looking for? Let us know what tool we are missing and we'll build it!
Quickly split text into chunks.
Quickly merge lines of text together.
Quickly repeat text many times.
Quickly write text backwards.
Quickly cut text to the given length.
Quickly trim left or right side of text.
Quickly pad the left side of text.
Quickly pad the right side of text.
Quickly align text to the right side.
Quickly center text.
Quickly prepend a prefix to text.
Quickly append a suffix to text.
Quickly delete all blank lines from text.
Quickly delete all repeated lines from text.
Quickly return text lines that match a string or a regex.
Quickly extract a text snippet of the given length.
Quickly find and replace text patterns.
Quickly count the number of characters in text.
Quickly find the number of lines in text.
Quickly add a number before every text line.
Quickly create an image from text.
Apply the Zalgo effect to the input text.
Quickly construct a palindrome from plain text.
Quickly test if text is a palindrome.
Quickly switch between various letter cases in text.
Quickly convert text letters to uppercase.
Quickly convert text letters to lowercase.
Quickly randomize character case in text.
Quickly invert character case in text.
Quickly replace spaces with newlines in text.
Quickly replace newlines with spaces in text.
Quickly get tabs instead of spaces in text.
Quickly get spaces instead of tabs in text.
Quickly clear text from spaces, tabs, and newlines.
Quickly clear text from dots, commas, and similar characters.
Quickly extract tag content from HTML code.
Quickly extract tag content from an XML document.
Quickly extract all textual data from BBCode markup.
Quickly extract keys and values from a JSON data structure.
Quickly convert text to a JSON string.
Quickly convert previously JSON stringified text to plain text.
Quickly escape special symbols in text with slashes.
Quickly remove slashes from previously slash-escaped text.
Quickly encode or decode text using ROT13 cipher algorithm.
Quickly encode and decode text with ROT47 cipher algorithm.
Quickly create text that matches the given regexp.
Quickly find and return all regexp matches.
Quickly check whether text matches a regular expression.
Quickly format text using the printf or sprintf function.
Quickly cyclically rotate text letters to the right or left.
Quickly rewrite text to vertical position.
Quickly format text so that all words are in neat columns.
Quickly convert data aligned in columns to linear text.
Quickly create a list of all monograms from text.
Quickly create a list of all digrams from text.
Quickly create a list of all ngrams from text.
Quickly write the text in Morse code.
Quickly decode Morse code to plain text.
Quickly URL-escape text.
Quickly URL-unescape text.
Quickly convert all plain text characters to HTML entities.
Quickly convert HTML entities to plain text.
Quickly encode text to base64.
Quickly decode base64-encoded text.
Quickly convert plain text to binary text.
Quickly convert binary text to plain text.
Quickly convert plain text to octal text.
Quickly convert octal text to plain text.
Quickly convert text to decimal values.
Quickly convert decimal values to text.
Quickly convert plain text to hexadecimal values.
Quickly convert hexadecimal to readable text.
Coming soon These text tools are on the way
Calculate Levenstein Distance
Find Levenstein distance of two text fragments.
Tokenize Text
Create a list of all words in text.
Lemmatize Text
Lemmatize all words in text.
Generate Glitch Text
Mess up characters in your text.
Generate Random Text
Generate text using random words.
Convert Text to Code Points
Convert text characters to their corresponding code points.
Convert Code Points to Text
Convert numeric character code points to text.
Convert CSV to Text Columns
Convert CSV data to plain text columns.
Convert Text Columns to CSV
Convert plain text columns to a CSV file.
Generate Text Trigrams
Create a list of all 3-grams.
Generate Text Skip-grams
Create a list of all n-skip-m-grams.
Stem Words in Text
Apply stemming to all words in text.
Convert Text to Title Case
Convert words in text to have title case.
Convert Text to Proper Case
Capitalize the first letter of every word in text.
Justify Text
Stretch spaces between words in text to make all lines equal length.
Chunkify Text
Divide text into chunks of certain size.
Slice Text
Extract a slice from text.
Format Text
Apply formatting and modification functions to text.
Find the Number of Letters in Text
Count the number of letters in text.
Find the Number of Words in Text
Count the number of words in text.
Find the Number of Paragraphs in Text
Count the number of paragraphs in text.
Sort Letters in Text
Sort all characters in text alphabetically.
Sort Words in Text
Sort all words in text alphabetically.
Sort Sentences in Text
Sort all sentences in text alphabetically.
Sort Paragraphs in Text
Sort all paragraphs in text alphabetically.
Statistical Text Analysis
Analyze text for most frequent letters, words, phrases, sentences and paragraphs.
Enumerate Characters
Add a number before every character in text.
Wrap Text
Wrap words in text to a specified length.
Shuffle Letters in Text
Randomize the order of letters in text.
Shuffle Words in Text
Randomize the order of all words in text.
Shuffle Sentences in Text
Randomize the order of all sentences in text.
Shuffle Paragraphs in Text
Randomize the order of all paragraphs in text.
Find All Email Addresses in Text
Extract all emails from text.
Find All Web Addresses in Text
Extract all URLs from text.
Find All Numbers in Text
Extract all numbers from text.
Encode Text to Punycode
Convert text to punycode.
Decode Punycode to Text
Convert punycode to text.
Convert Text to Base32
Encode text to base32 encoding.
Convert Base32 to Text
Decode base32-encoded text.
Convert Text to Base58
Encode text to base58 encoding.
Convert Base58 to Text
Decode base58-encoded text.
Convert Text to Base85
Encode text to Ascii85 encoding.
Convert Base85 to Text
Decode Ascii85-encoded text.
Convert Text to Nettext
Encode text to nettext encoding.
Convert Nettext to Text
Decode nettext-encoded text.
UTF8-encode Text
Encode text to UTF8 encoding.
UTF8-decode Text
Decode UTF8-encoded text.
UTF16-encode Text
Encode text to UTF16 encoding.
UTF16-decode Text
Decode UTF8-encoded text.
UTF32-encode Text
Encode text to UTF32 encoding.
UTF32-decode Text
Decode UTF32-encoded text.
IDN-encode Text
Encode text to IDN.
IDN-decode Text
Decode IDN-encoded text.
Uuencode Text
Convert text to Unix-to-Unix encoding.
Uudecode Text
Decode Unix-to-Unix-encoded text.
Xxencode Text
Convert text to Xxencoding.
Xxdecode Text
Decode Xxencoded text.
Convert Text to Quoted Printable
Encode text to QP encoding.
Convert Quoted Printable to Text
Decode QP-encoded text.
Strip HTML Tags from Text
Remove all HTML tags from Text.
Strip XML Tags from Text
Remove all XML tags from Text.
Remove Diacritics from Text
Remove all accent marks from all characters in text.
Normalize Text Spacing
Remove duplicate spaces from text.
Compare Text
Find diff between two text fragments.
Create Text Typos
Generate various text typos.
Create a Mirror Copy of Text
Generate a mirror reflection of text.
Grep Text
Grep text for regular expression matches.
Head Text
Extract first lines from text.
Tail Text
Extract last lines from text
Rewrite Text
Rewrite text using transformation rules.
Generate Text Mnemonic
Return the first letter of each word in text.
Reverse Words in Text
Reverse every word in the given text.
Reverse Sentences in Text
Reverse every sentence in the given text.
Create a Word Cloud
Create an image from all words in text.
Split Words into Syllables
Split the input text into syllables.
Draw a Box Around Text
Surround text in a box.
Create ZigZag Text
Make letters in text go in a zigzag.
Remove Zalgo from Text
Undo Zalgo effect from text.