Convert PNG to TXT

Converting PNG to TXT reads the words out of a screenshot and gives them back as plain text you can paste. A screenshot is close to the ideal input for recognition — sharp, straight, machine-rendered type — and it all runs on your own device.

  • Where it runs In your browser. The file is never uploaded.
  • Rebuilt TXT works differently from a PNG, so this is not the gradual degradation a lossy codec applies. What TXT can express is reproduced faithfully; what it has no equivalent for does not survive at all.
  • File size limit Up to 100 MB per file, free, without an account.
  • Worth knowing The text is read by pattern recognition, so it is a best guess and not a transcript. Clean, straight, well-lit type at a decent resolution comes out close to perfect; a photograph taken at an angle, a faint fax, an unusual typeface or handwriting will produce mistakes. Always read the result against the original before relying on it. The language setting matters — text read with the wrong one comes back as confident nonsense rather than as an error.

Up to 100 files at once. Mixed formats are fine.

Somebody sent you words you cannot select

It is a remarkably common situation. An error message screenshotted into a ticket. A document received as a picture instead of a file. A chart whose labels you need. A page of a PDF that turned out to be a scan. A message forwarded as an image because that was easier than copying it.

In every case the words exist and the only route to them is retyping — until you read them back off the picture. That is what this does, and on a screenshot it does it well.

A screenshot is the best possible input

Everything that makes photographed text hard is absent. The focus is perfect because nothing was focused. There is no angle, because the page is the screen. There is no shadow, no uneven light and no camera shake. And the type was rendered by software rather than printed and then photographed, so the letterforms are exactly what the font specified.

The practical consequence is that expectations can be higher here than on the photograph pages. Clean interface text at normal resolution usually comes back essentially exact, and where it does not, the cause is nearly always one of the two things below.

Resolution is the thing that spoils it

Recognition needs enough pixels per character. A screenshot taken at full size on a modern display has plenty; one that has been scaled down to fit a document, compressed by a chat application, or captured from a low-resolution screen may not.

Enlarging the image afterwards does not help — it adds pixels without adding information, and often makes the result worse by softening the letterforms. If a result is poor, retake the screenshot at full size, or zoom the application in before capturing so the text is physically larger on screen.

Set the language, even for interface text

The recogniser matches shapes against the letterforms and vocabulary of one language, and given the wrong one it produces confident nonsense rather than an error. This catches people out on screenshots specifically, because interface text is short and the errors look like plausible words.

It matters most for anything with accented characters or a non-Latin script, and for mixed content — a German interface with English technical terms in it will read better with the language set correctly than with either one guessed.

Code and terminals: check what you paste

Screenshots of code and command lines are among the commonest inputs, and they carry a specific hazard. The characters that matter most in code are precisely the ones that look alike: the digit one against a lowercase L against a pipe, zero against capital O, and in some fonts a hyphen against an underscore or an en dash.

A misreading between any of those produces text that looks correct and does not work, and the error is in the character least likely to be noticed. Read anything you intend to run, and prefer a monospaced source — the fonts terminals use are designed to distinguish exactly these characters, which helps the recogniser as much as it helps you.

Layout does not come with the words

The output is plain text in reading order. A table becomes a run of values with no columns, a two-column layout can interleave, and headings arrive as ordinary lines.

For most screenshot work that is exactly enough — you wanted the error message, the reference number or the paragraph. Where it is not enough is a table you intend to use rather than read, and there the honest position is that this gets you the numbers to verify rather than a structure to import.

The screenshot never leaves your machine

The recognition runs inside the browser tab on your own processor. Nothing is uploaded, so there is no server copy, no account and no daily allowance, and a folder of images converts as fast as your machine can read them.

Screenshots are a particularly sensitive category and people rarely think of them that way: they routinely contain account numbers, internal system names, customer records, colleagues’ names in a message list, and whatever else happened to be on screen at the edges of the capture. Not sending them anywhere is the straightforward answer to all of it.

How to copy the text out of a PNG screenshot

  1. Capture the screenshot at full size rather than scaling it down afterwards.
  2. Drop it here and choose the language of the text before converting.
  3. Paste the result, and check any code or reference numbers character by character.

PNG and TXT: rendered type read back as characters

PNG compared with TXT
PNGTXT
Full namePortable Network GraphicsPlain Text
File extension.png.txt, .text, .log
Media typeimage/pngtext/plain
CompressionLossless — nothing is discarded
First published19961963
Published byPNG Development Group
SpecificationISO/IEC 15948Unicode
LicensingOpen standardOpen standard
Standing todayCurrentCurrent
Bit depth16
Colour it can describeRGB, greyscale, indexed palette
Largest image2,147,483,647 px per side
Opens in a browserEvery browserEvery browser
Considered insteadWebP, SVG, JXLMD, RTF

What the target format adds

TXT is a working format and PNG is a finished one. What comes back is editable text and objects rather than a picture of a page, which is usually the reason for the conversion and also where its limits are.

Opening the result

The usual programs do not overlap: PNG opens in Adobe Photoshop, GIMP and Paint.NET, TXT in Notepad, TextEdit and Visual Studio Code — so whoever receives the result needs something from the second list.

What each format is for

The two are aimed at different work: PNG at screenshots, line art and logos and the web, TXT at moving data between programs and archiving. That is worth weighing before converting, because the reason one exists is usually the reason the other is awkward.

PNG is PNG Development Group's format, published in 1996. It records 16 bits per channel.

TXT dates from 1963, specified as Unicode. Notepad, TextEdit and Visual Studio Code all read it.

TXT was published in 1963 and PNG in 1996. The older one is generally the safer file to hand to somebody; the newer one usually does the job in fewer bytes.

PNG to TXT: accuracy, tables and code

Are my PNG files uploaded anywhere?

No. This conversion runs entirely inside your browser, so the file never leaves your device. You can confirm it yourself: open the network tab of your browser's developer tools and convert something. You will see the page load, plus the analytics and advertising the site is paid for with — and nothing carrying your file. The engine behind this particular pair is Tesseract, the open-source text recognition engine; your browser fetches it once and caches it.

How accurate is it on a screenshot?

Very. A screenshot is close to the ideal input for text recognition — perfect focus, no angle, no shadow, and type rendered by the machine rather than printed and photographed. Clean interface text at normal resolution usually comes back essentially exact.

Why did a small screenshot come out badly?

Resolution. Text recognition needs enough pixels per character, and a screenshot scaled down, or taken from a low-resolution display, may not have them. Retake it at full size rather than enlarging the image, which adds pixels without adding detail.

Does it keep the table layout?

No. The output is plain text in reading order, so a table comes back as a run of values without its columns. For a table you intend to work with, this gets you the numbers to check rather than a structure to use.

Why is the output nonsense?

Usually the language setting. Text read against the wrong language does not fail — it produces confident nonsense, because the recogniser is matching shapes within a vocabulary that does not contain the right answer. Set it before converting.

Can it read code or a terminal?

Reasonably, and with a specific hazard: the characters that matter most in code are the ones that look alike. A misread between the digit one, a lowercase L and a pipe, or between zero and a capital O, produces something that looks correct and does not run. Check any code you paste.

Is my screenshot uploaded?

No. The recognition runs inside your own browser, so the image never leaves your device. Screenshots routinely contain account details, internal systems and other people’s names, so that is worth more here than on most conversions.

More about these formats

Where these figures come from

The claims this page makes about PNG and TXT are checkable, and these are the documents that settle them.