᠎᠎᠎          
51K

Text file slicer

World's simplest file tool

This is a free browser-based utility that slices files with textual data. You can specify the start and end positions of the slice and get a snippet of any length. You can also slice several lines of a file at once and reverse the order of characters in the extracted snippets. Created by computer geeks at team Browserling.
Check out our main project! Browserling
We created Browserling – get a cloud browser in 5 seconds. Check it out!
Range of Slice
Slice start.
Slice end.
The slice range corresponds to character positions in the text file and includes both ends of the range.
Separate and Reverse Slicing
Apply the slicing algorithm to each individual file line.
When a slice is extracted, reverse characters in it.
Text file slicer tool What is a text file slicer?
This online program extracts character chunks from a textual file. You can control the size of a file slice in the options via the slice-start and slice-end parameters. The start and end points of the slice correspond to the character position in the file and both ends are included in the extracted fragment. For example, if the uploaded file contains one word "incredible", then the range [2, 5] will return the string "ncre". If the text data is lengthy and it's difficult to determine the position of the ending character, then you can use negative positions, which count characters from the end of the file. For example, the range [3, -2] will return the string "credibl". If you need a fragment from a specific point to the end of the file, then you can omit the slice-end value. For example, the range [3, ] will return the string "credible". Similarly, if you need a piece of data from the beginning of the file to some specific end point, then you can skip the slice-start value. For example, the range [ , -3] will return the string "incredib". If the file content has many lines, then you can apply the slicing algorithm to every single line in the file. By activating the "Slice File Lines Separately" option, the application will return a slice of each separate line. As an additional feature, you can reverse characters in the extracted fragments. Filabulous!
Text file slicer examples Click to use
Sherlock Holmes Quote
In this example, Sherlock Holmes sent us a file with his newest quote and asked us to extract the most important part from it. To do this, we used our text file slicer and entered the character range from 5 to 35. The extracted fragment is 31 characters long and reads as "world is full of obvious things".
The world is full of obvious things which nobody by any chance ever observes. Sherlock Holmes
world is full of obvious things
Required options
These options will be used automatically if you select this example.
Slice start.
Slice end.
Apply the slicing algorithm to each individual file line.
When a slice is extracted, reverse characters in it.
Harry Potter Books
In this example, we load a file that contains a list of seven books in the Harry Potter series. Each fantasy novel is printed on a new line and has the same title fragment at the beginning that says "Harry Potter and ...". We want to focus only on the ending part of the book name, so we slice the titles starting from the 22nd symbol to the final symbol of the line. To slice all titles simultaneously, we enable the separate line slicing option and get the ending parts of all seven books.
Harry Potter and the Philosopher's Stone Harry Potter and the Chamber of Secrets Harry Potter and the Prisoner of Azkaban Harry Potter and the Goblet of Fire Harry Potter and the Order of the Phoenix Harry Potter and the Half-Blood Prince Harry Potter and the Deathly Hallows
Philosopher's Stone Chamber of Secrets Prisoner of Azkaban Goblet of Fire Order of the Phoenix Half-Blood Prince Deathly Hallows
Required options
These options will be used automatically if you select this example.
Slice start.
Slice end.
Apply the slicing algorithm to each individual file line.
When a slice is extracted, reverse characters in it.
Slice and Reverse
In this example, we decided to demonstrate the remaining features of this web application and in addition to slicing the file, we also reverse the characters in the extracted pieces. The loaded file contains a quote from the Finding Nemo adventure film. We slice it from the beginning (start slice option is empty) to position -16 (which means 16 characters from the end of the file) and then we reverse all symbols.
"Just keep swimming" – Finding Nemo
"gnimmiws peek tsuJ"
Required options
These options will be used automatically if you select this example.
Slice start.
Slice end.
Apply the slicing algorithm to each individual file line.
When a slice is extracted, reverse characters in it.
Pro tips Master online file 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://onlinefiletools.com/slice-text-file?input=The%20world%20is%20full%20of%20obvious%20things%20which%20nobody%20by%20any%20chance%20ever%20observes.%20Sherlock%20Holmes&start=5&end=35&multi-line=false&reverse=false
All file tools
Didn't find the tool you were looking for? Let us know what tool we are missing and we'll build it!
Quickly generate a random text file of any size.
Quickly generate a random binary file of arbitrary size.
Quickly generate an empty file with any extension.
Quickly shorten a text file to the given number of bytes.
Quickly extract a fragment of a certain size from a text file.
Quickly simulate data corruption in a text file.
Coming soon These file tools are on the way
Extract a File Fragment
Extract a byte range between start and end positions.
Randomly Flip Bits in a File
Corrupt data by flipping one or more bits in the given file.
Zip Compress a File
Compress a file using the zip compression algorithm.
Uncompress a Zip File
Unzip a .zip file and extract its content.
RAR Compress a File
Compress a file using the RAR compression algorithm.
Uncompress a RAR File
Unrar a .rar file and extract its content.
Gzip Compress a File
Compress a file using the gzip compression algorithm.
Gunzip a File
Uncompress a .gz file and extract its content.
Bzip2 Compress a File
Compress a file using the bzip2 compression algorithm.
Bunzip2 a File
Uncompress a .bz file and extract its content.
Xz Compress a File
Compress a file using the xz compression algorithm.
Unxz a File
Uncompress an .xz file and extract its content.
Lzma Compress a File
Compress a file using the LZMA compression algorithm.
Unlzma a File
Uncompress an .lzma file and extract its content.
Tar a File
Create a tarball with the given files.
Untar a File
Extract the contents of a .tar archive.
Base32 Encode a File
Convert a file to base32 encoding.
Base32 Decode a File
Create a file from base32 encoding.
Base64 Encode a File
Convert a file to base64 encoding.
Base64 Decode a File
Create a file from base64 encoding.
URL Encode a File
Convert a file to URL encoding (percent encoding).
URL Decode a File
Create a file from URL encoded data (percent encoded data).
Convert a File to HTML Entities
Encode a file to HTML.
Convert HTML Entities to a File
Create a file from HTML entities.
Merge Files
Merge multiple files together.
Create a High Entropy File
Generate a file that has high entropy.
Create a Low Entropy File
Generate a file that has low entropy.
Generate a Small File
Create a relatively tiny binary or text file (useful for testing).
Generate a Big File
Create a relatively large binary or text file (useful for testing).
Generate a Single Byte File
Create a file with any extension that contains just one byte.
Split a File
Split a file in chunks of certain size.
Reverse a File
Reverse the order of bytes in a file.
Change File Endianness
Swap bytes in a file to change its endianness.
Randomly Replace Bytes in a File
Corrupt a file by randomly replacing byte values in a file.
Randomly Delete Bytes From a File
Corrupt a file by removing one or more bytes at random positions.
Remove Bytes From a File
Delete certain bytes from a file.
Change Bytes in a File
Replace bytes in a file.
Left-pad a File
Pad a file with bytes on the left.
Right-pad a File
Pad a file with bytes on the right.
Zero-fill a File
Change all bytes in a file to zeros.
Create Random Bytes
Generate a list of random bytes.
Analyze a File
Print information about a file.
Display a Hex Dump of a File
Print a hexadecimal view of the data in a file.
Zalgo a File
Let Zalgo destroy your file.