22 tools for extracting, formatting, counting, and converting text directly in your browser.
Got a screenshot, a photo of a whiteboard, or a scanned page and need the actual words? The Text Bench runs real OCR (via Tesseract) to read text out of images, and can pull the existing text layer straight out of a text-based PDF both fully client-side.
22 toolsOCR includedWorks offline after first load
Optical OCR
Markdown
JSON Format
Case Convert
Real OCR, not a guess
Tesseract.js reads printed text from photos and scans directly in your browser.
PDF text extraction
Pull the existing text layer out of any text-based PDF in one click no re-typing.
🔒 100% browser-based · No uploads · No sign-up · No watermarks
Mergio Text Tools Guide
Image to Text (OCR)
Extracting text from photos or scanned documents shouldn't require installing bulky software. Our Image to Text tool leverages Tesseract.js (WebAssembly) to read printed or typed text directly within your browser. This is exceptionally useful for digitizing physical notes, recovering text from screenshots, or extracting information from infographics without manually typing everything out.
How to extract text from an image
Select the Image to Text (OCR) tool from the Text Bench.
Drop your JPG, PNG, or WebP image file into the designated area.
Wait a few seconds while the Tesseract OCR engine processes the image locally.
Download the resulting .txt file containing your digitized text.
Does this tool work on handwritten notes?
Tesseract OCR is primarily trained on printed and typed fonts. While it might pick up some very neat handwriting, it works best with clear, standard typography.
Is my image uploaded to a server for OCR?
No. Mergio runs the OCR engine locally via WebAssembly, meaning your images remain securely on your device.
For optimal OCR accuracy, ensure your image has good lighting, high contrast between text and background, and is relatively straight.
PDF to Text
Grabbing text out of a multi-page PDF can be a frustrating experience when dealing with messy formatting and copy-paste limitations. Our PDF to Text extractor utilizes PDF.js to directly read the internal text layer of your document. It pulls out clean, unformatted text from every page sequentially, making it perfect for preparing PDF reports for data analysis or transferring content to a word processor.
How to extract text from a PDF
Open the PDF to Text tool from the menu.
Drag and drop your PDF file into the workspace.
The tool will iterate through all pages and compile the text.
Save the output as a clean text file.
Why did it output "(no text layer found)"?
This means your PDF is likely a scanned image rather than a digitally created document. To extract text from a scanned PDF, convert the pages to images first, then use our Image to Text (OCR) tool.
Will this preserve my PDF's tables and layout?
No, this tool specifically strips away formatting to provide raw, unstyled text. It extracts words in the order they are encoded in the PDF.
Text to PDF
Sometimes you need to lock down a simple text document into a universally readable format. The Text to PDF converter relies on PDF-lib to generate standard PDF files instantly from plain text. Whether you're saving code snippets, generating simple invoices, or preparing reading materials, this utility ensures your text displays exactly the same on any operating system or device.
How to convert a text file to PDF
Select the Text to PDF tool in the Text Bench.
Upload your plain .txt file.
The PDF generator will automatically paginate and format the text.
Download your newly created PDF document.
Can I customize the font or margins?
Currently, the tool uses a standard Helvetica font at 12pt with uniform margins for quick, reliable conversions. We focus on speed and compatibility.
Does it handle special characters?
It handles standard ASCII and common Latin characters. Highly specialized unicode symbols might be stripped or replaced by spaces to maintain PDF compatibility.
Text to Word
Moving from raw notes to a professional document usually involves opening a heavy word processor. Our Text to Word tool skips that step by assembling a standard DOCX file using JSZip directly in your browser. It wraps your plain text in Office Open XML formatting, making it ideal for converting drafts, raw data dumps, or simple text notes into a format ready for formal editing.
How to convert text to Word
Click on the Text to Word tool.
Provide a standard .txt file.
The application packages the text into a DOCX XML structure.
Download the .docx file and open it in Microsoft Word or compatible software.
Will this tool create rich formatting like bold or italics?
No, this tool converts plain text. Since plain text contains no formatting metadata, the resulting Word document will contain unformatted paragraphs.
Do I need Microsoft Word installed to use this tool?
You don't need Word to create the file—Mergio generates the DOCX structure independently. However, you will need a compatible word processor to open the final file.
HTML entities like < and & are automatically safely escaped during the conversion to prevent corrupting the Word document structure.
Text to HTML
Web developers and content creators frequently need to transform raw copy into basic web-ready markup. The Text to HTML utility quickly wraps your paragraphs in standard HTML tags, giving you a structured document ready for web deployment. It's a massive time-saver when prepping blog posts, documentation, or email newsletter copy that needs to be inserted into a CMS.
How to format text into HTML
Navigate to the Text to HTML converter.
Upload your plain text file.
The tool will wrap paragraphs and escape special characters.
Save the resulting .html file to your device.
Does it generate a full HTML document?
Yes! It generates a complete HTML5 skeleton, including the DOCTYPE, head, and body tags, with your text wrapped in paragraph elements.
Are line breaks preserved?
The tool treats empty lines as paragraph boundaries, wrapping blocks of text in separate <p> tags for semantic structure.
Text to Markdown
Markdown has become the standard for writing technical documentation, readme files, and notes. Our Text to Markdown converter helps you transition raw text files into a clean Markdown structure by normalizing spacing and paragraph breaks. If you're moving old text archives into modern note-taking apps like Obsidian or Notion, this tool streamlines the preparation phase.
How to format text into Markdown
Choose the Text to Markdown tool.
Upload a standard .txt file.
The script standardizes paragraph spacing.
Download the prepared .md file.
Does this auto-detect headings or lists?
No, because plain text lacks reliable semantic markers, the tool focuses on ensuring clean paragraph separation that conforms to Markdown standards.
Why use this instead of just renaming the file extension?
While you can just rename a file, this tool actively parses and normalizes double line breaks, ensuring strict compatibility with Markdown parsers that require specific spacing.
Markdown to HTML
Taking a Markdown document and turning it into a web page shouldn't require a complex build pipeline. The Markdown to HTML converter acts as a lightweight parser, transforming headings, bold text, links, and images into valid HTML elements. It's an excellent utility for previewing documentation, generating quick static pages, or converting readmes for platforms that only accept HTML.
How to convert Markdown to HTML
Select the Markdown to HTML tool.
Drag and drop your .md file into the browser.
The tool parses syntax like `#`, `**`, and `[]()`.
Download the standalone .html file.
Which Markdown syntax is supported?
The parser handles standard headings (H1-H3), blockquotes, bold, italics, images, and standard hyperlink structures.
Is CSS styling included in the output?
The output is pure, semantic HTML without any embedded CSS styles. This makes it a perfect clean slate to drop into your existing web projects.
Markdown to PDF
Sharing technical specs or documentation in Markdown isn't always ideal if the recipient doesn't have a Markdown viewer. Our Markdown to PDF tool parses your .md file, strips the syntax characters, and renders the clean text into a standard PDF document. This is highly useful for generating quick manuals, submitting assignments, or archiving documentation in a universally accessible format.
How to save Markdown as a PDF
Open the Markdown to PDF tool.
Upload your Markdown (.md) document.
The processor cleans the syntax and paginates the text.
Download your formatted PDF file.
Will images from my Markdown file appear in the PDF?
No, this tool specifically converts the text content of your Markdown file. Image links and formatting syntax are stripped away to produce a clean text-based PDF.
Are bold and italic text styles preserved?
To ensure maximum compatibility and speed via PDF-lib, the tool currently renders all text in a standard, unstyled font, removing the markdown asterisks in the process.
Keep in mind that highly complex Markdown tables might lose their intended visual structure, as the tool prioritizes raw text flow.
Word Counter
Meeting a strict word limit for an essay, article, or manuscript is a fundamental part of writing. The Word Counter tool performs a deep analysis of your text file, calculating total words, characters, sentences, and paragraphs. It even provides an estimated reading time based on a standard 200 words-per-minute pace, making it invaluable for speechwriters, bloggers, and students.
How to count words in a document
Select the Word Counter tool from the list.
Drop your text document into the dropzone.
Review the instant analysis report generated by the tool.
Download the summary text file for your records.
How does the tool define a word?
The counter uses regular expressions to identify discrete blocks of alphanumeric characters surrounded by word boundaries (spaces or punctuation).
How is reading time calculated?
Estimated reading time is calculated by dividing the total word count by an average reading speed of 200 words per minute, rounded up to the nearest whole minute.
Character Counter
Whether you're crafting social media posts, writing meta descriptions for SEO, or dealing with strict database limits, knowing your exact character count is crucial. The Character Counter provides a granular breakdown of your text file, distinguishing between total characters, characters without spaces, vowels, consonants, and numerical digits.
How to count characters in a file
Open the Character Counter tool.
Provide a standard text file.
The script will analyze the composition of the text.
Download the detailed statistical report.
Are line breaks counted as characters?
Yes, in the 'Total Characters' metric, whitespace characters including line breaks and tabs are counted. The 'Characters (no spaces)' metric ignores them.
Why would I need to count vowels and consonants?
This granular breakdown is often utilized in linguistics, cryptography, or when creating specific types of puzzles and word games.
Case Converter
Fixing text that was accidentally typed with caps lock on, or standardizing a list of names, can be incredibly tedious. The Case Converter tool instantly transforms the capitalization of your entire text file. With options for Uppercase, Lowercase, Title Case, and Sentence Case, this utility is perfect for data cleansing, formatting headlines, or prepping text for database entry.
How to change text capitalization
Click on the Case Converter tool.
Select your desired case type (e.g., Title Case) from the options.
Upload your text file.
Download the freshly formatted text file.
How does Sentence Case work?
Sentence Case capitalizes the very first letter of the document and any letter that immediately follows a period, exclamation mark, or question mark.
Will Title Case capitalize small words like 'and' or 'the'?
Currently, the Title Case option capitalizes the first letter of *every* word, which is useful for data uniformity but may require manual tweaking for strict editorial style guides.
Remove Duplicates
When merging email lists, aggregating log files, or combining data sets, duplicate entries are a common headache. The Remove Duplicate Lines tool filters your text file, ensuring every line is entirely unique. By utilizing native JavaScript Sets, it can process thousands of lines instantly, giving you a clean, deduplicated file ready for use in spreadsheets or databases.
How to remove duplicate lines from a file
Select the Remove Duplicates tool.
Upload a text file containing line-separated data.
The tool will instantly identify and remove exact matching lines.
Download the deduplicated text file.
Does it preserve the original order of the lines?
Yes. The tool keeps the first instance of a line and removes any subsequent identical lines, maintaining the general flow of your document.
Is it case-sensitive?
Yes. A line reading "apple" and a line reading "Apple" are treated as distinct entries and neither will be removed.
Ensure there are no trailing spaces on your lines, as "word" and "word " are technically considered unique.
Find and Replace
Executing a mass string replacement across a large configuration file or manuscript can crash lightweight text editors. The Find and Replace tool handles bulk substitutions effortlessly in the browser. Whether you're updating API endpoints, changing character names in a story, or fixing recurring typos, this tool processes replacements swiftly across entire documents.
How to batch find and replace text
Open the Find and Replace tool.
Enter your target string in the "Find" field and the new string in "Replace".
Upload your text file.
Download the updated file with all substitutions made.
Does this tool support Regular Expressions?
No, to prevent accidental formatting errors for standard users, the tool treats your input as literal text and automatically escapes regex control characters.
Will it replace parts of words?
Yes. If you find "cat" and replace it with "dog", a word like "category" will become "dogegory". Use descriptive find strings to avoid unintended replacements.
JSON Formatter
Raw, unformatted JSON data returned from an API or exported from a database is nearly impossible for a human to read. The JSON Formatter takes minified or messy JSON files and applies proper indentation and line breaks. This tool is an essential daily utility for software developers and data analysts who need to debug payloads or inspect data structures.
How to beautify a JSON file
Select the JSON Formatter from the Text Bench.
Upload your unformatted .json file.
The parser will structure the data with 2-space indentation.
Save the newly formatted file to your system.
What happens if my JSON is invalid?
If the file contains syntax errors and cannot be parsed, the tool will simply return the original text without formatting it.
Does it organize the keys alphabetically?
No, the formatter preserves the original order of the keys in your JSON object, altering only the whitespace for readability.
JSON Minifier
When deploying configuration files or transferring data over a network, every byte counts. The JSON Minifier strips out all unnecessary whitespace, line breaks, and indentation from your JSON files. This creates a compact, single-line file that reduces payload size and optimizes loading times for web applications and APIs.
How to compress a JSON file
Open the JSON Minifier tool.
Upload a formatted .json file.
The tool removes all extraneous characters.
Download the minified version of your file.
Will minifying my JSON alter the data?
No, minification only affects structural whitespace (spaces, tabs, and newlines outside of string values). The actual data remains exactly the same.
Why would I want my JSON to be unreadable?
Minification isn't for humans; it's for computers. A minified file takes up less disk space and transfers faster over the internet, which is critical for high-performance applications.
XML Formatter
XML files are notorious for becoming convoluted, especially when generated by enterprise software or legacy systems. The XML Formatter brings order to the chaos by adding logical indentation and line breaks to your markup. Whether you're configuring a server, modifying an RSS feed, or debugging SOAP responses, this tool makes your XML human-readable again.
How to format an XML file
Navigate to the XML Formatter tool.
Upload your raw .xml file.
The script will recursively apply indentation based on node depth.
Download the beautifully structured XML document.
Does it validate the XML structure?
The formatter applies visual structure based on opening and closing tags, but it is not a strict validator. It will format well-formed XML accurately.
Does it support self-closing tags?
Yes, the algorithm recognizes self-closing tags and prevents them from incrementing the indentation level for subsequent lines.
CSV to JSON
Converting spreadsheet data into a format that web applications can consume is a routine programming task. The CSV to JSON converter translates comma-separated values into a structured JSON array, using the first row of your CSV as the object keys. It's the fastest way to turn Excel exports or database dumps into API-ready data blocks.
How to convert a CSV file to JSON
Select the CSV to JSON tool.
Drop your .csv file into the workspace.
The tool parses the headers and maps the data into objects.
Download the formatted .json file.
Does my CSV need a header row?
Yes! The tool explicitly relies on the very first row of your CSV file to act as the keys for the generated JSON objects.
What happens if a field is empty?
Empty fields in the CSV will be mapped as empty strings in the resulting JSON file, preserving the structure of the data.
JSON to CSV
When non-technical stakeholders need to view API data, handing them a JSON file rarely works out well. The JSON to CSV tool flattens JSON arrays into a standard comma-separated spreadsheet format. It handles the escaping of internal commas and quotes automatically, ensuring the output file opens cleanly in Excel, Google Sheets, or Numbers.
How to convert a JSON file to CSV
Open the JSON to CSV converter.
Upload a .json file containing an array of objects.
The tool extracts keys for headers and flattens the values.
Download your spreadsheet-ready .csv file.
What if my JSON has nested objects?
This tool is designed for flat JSON structures. If your data contains deeply nested objects or arrays, they will be converted to string representations, so flatten your data first if possible.
How does it handle text that contains commas?
The tool automatically detects fields containing commas, quotes, or newlines and wraps those specific values in double quotes, conforming to standard CSV specifications.
Base64 Encoder
Embedding small files directly into HTML/CSS or transmitting data safely through text-based protocols requires specific encoding. The Base64 Encoder takes the raw bytes of your text file and translates them into an ASCII string. This tool is vital for web developers creating data URIs, or system admins handling basic authentication credentials.
How to encode a text file to Base64
Select the Base64 Encoder tool.
Upload the text file you wish to encode.
The tool reads the file into an array buffer and encodes it.
Download the resulting .txt file containing the Base64 string.
Is Base64 encoding a form of encryption?
No. Base64 is merely a data format translation to ensure data integrity during transmission. It provides zero security and can be easily decoded by anyone.
Will this increase the file size?
Yes, Base64 encoding generally increases the size of the original data by about 33%, due to how it maps 3 bytes of data into 4 ASCII characters.
Base64 Decoder
When you encounter a long, cryptic string of alphanumeric characters ending in equals signs, you're likely looking at Base64 data. Our Base64 Decoder reverses this process, taking the encoded string and reconstructing the original binary data. It's a fundamental tool for unpacking API payloads, recovering embedded web assets, or investigating email source code.
How to decode a Base64 string
Choose the Base64 Decoder tool from the bench.
Upload a text file containing only the Base64 string.
The application decodes the string back into raw bytes.
Download the resulting binary file (save it with the appropriate extension).
Why does the output have a .bin extension?
Because the decoder doesn't know what type of file was originally encoded (text, image, zip), it outputs a raw binary stream. You can simply rename the extension if you know what it should be.
What happens if the string is invalid?
If the input contains invalid characters not found in the Base64 index, the decoding process will fail and return an empty file.
URL Encoder
URLs have strict rules about which characters they can contain. Spaces, ampersands, and other special symbols must be escaped before being used in query strings or routing. The URL Encoder safely translates your text into a percent-encoded format, ensuring web servers and browsers route your requests without throwing 400 Bad Request errors.
How to URL encode a text string
Navigate to the URL Encoder tool.
Upload a text file containing the string you want to encode.
The tool applies strict URI component encoding.
Download the safely encoded text file.
What exactly does this tool encode?
It uses standard encodeURIComponent, meaning it encodes almost all characters (including /, ?, and &) except for alphabetic, decimal digits, and - _ . ! ~ * ' ( ).
Can I use this for entire URLs?
It is best used for the parameters (query strings) of a URL. Encoding an entire URL will break the protocol identifier.
URL Decoder
Analyzing web traffic logs or debugging complex API calls often leaves you staring at strings filled with percent signs and hex numbers. The URL Decoder instantly translates percent-encoded strings back into readable text. It takes the guesswork out of reading UTM parameters, affiliate links, or complex database queries passed through web requests.
How to decode a URL string
Select the URL Decoder tool.
Upload the text file containing the encoded string.
The application parses the percent-encoding.
Download the human-readable text file.
Will this tool fix broken links?
No, it simply translates valid percent-encoded characters back to their standard text equivalents for readability.
What happens if there's an invalid percentage sequence?
If the string contains a malformed sequence, the decoder will gracefully handle the error and return the original text untouched.