Text Recognition

This page describes an old version of the Text Recognition API, which was part of ML Kit for Firebase. The functionality of this API has been split into two new APIs (learn more):

With ML Kit's text recognition APIs, you can recognize text in anyLatin-based language (and more, with Cloud-based text recognition).

Text recognition can automate tedious data entry for credit cards, receipts, andbusiness cards. With the Cloud-based API, you can alsoextract text from pictures of documents, which you can use to increaseaccessibility or translate documents. Apps can even keep track of real-worldobjects, such as by reading the numbers on trains.

iOSAndroid

If you're a Flutter developer, you might be interested inFlutterFire, which includes a plugin for Firebase's ML Vision APIs.

This is a beta release of ML Kit for Firebase. This API might be changed in backward-incompatible ways and is not subject to any SLA or deprecation policy.

Choose between on-device and Cloud APIs

On-deviceCloud
PricingFree

Free for first 1000 uses of this feature per month: seePricing

Ideal use cases Real-time processing—ideal for a camera or video feed
Recognizing sparse text in images
High-accuracy text recognition
Recognizing sparse text in images
Recognizing densely-spaced text in pictures of documents

See theCloud Vision API demo.

Language supportRecognizes Latin charactersRecognizes and identifies a broad range of languages and special characters

Example results

Sparse text

Photo:Dietmar Rabich /Wikimedia Commons /"Düsseldorf, Wege der parlamentarischen Demokratie -- 2015 -- 8123" /CC BY-SA 4.0
Recognized Text
TextWege
der parlamentarischen
Demokratie
Blocks(1 block)
Block 0
TextWege der parlamentarischen Demokratie
Frame(117.0, 258.0, 190.0, 83.0)
Corner Points(117, 270), (301.64, 258.49), (306.05, 329.36), (121.41, 340.86)
Recognized Language Codede
Lines(3 lines)
Line 0
TextWege der
Frame(167.0, 261.0, 91.0, 28.0)
Corner Points(167, 267), (255.82, 261.46), (257.19, 283.42), (168.36, 288.95)
Recognized Language Codede
Elements(2 elements)
Element 0
TextWege
Frame(167.0, 263.0, 59.0, 26.0)
Corner Points(167, 267), (223.88, 263.45), (225.25, 285.41), (168.36, 288.95)

Document text

Recognized Text
TextDR. SEWARD'S DIARY 361
Professor. He had evidently expected some such call, for
I found him dressed in his room. His door was ajar, so that
he could hear the opening of the door of our room. He
came at once; as he passed into the room, he asked Mina
if the others might come, too.
"No," she said quite simply, "it will not be necessary.
You can tell them just as well. I must go with you on your
journey."
Dr. Van Helsing was as startled as I was. After a mo-
ment's pause he asked:
"But why?"

...

(full text)

Blocks(1 block)
Block 0
Text

DR . SEWARD ' S DIARY 361 Professor . He had evidently expected some such call , for I found him dressed in his room . His door was ajar , so that he could hear the opening of the door of our room . He came at once ; as he passed into the room , he asked Mina if the others might come , too .

" No , " she said quite simply , " it will not be necessary . You can tell them just as well . I must go with you on your journey . "

Dr . Van Helsing was as startled as I was . After a mo ment ' s pause he asked :

...

(full text)

Confidence0.98
Frame(25.0, 21.0, 359.0, 583.0)
Recognized Language Codeen
Paragraphs(10 paragraphs)
Paragraph 1
Text" No , " she said quite simply , " it will not be necessary . You can tell them just as well . I must go with you on your journey . "
Confidence0.98
Frame(29.0, 110.0, 355.0, 44.0)
Recognized Language Codeen
Words(34 words)
Word 7
Textsimply
Confidence0.99
Frame(179.0, 110.0, 37.0, 15.0)
Recognized Language Codeen
Symbols(6 symbols)
Symbol 0
Texts
Confidence1.00
Frame(179.0, 110.0, 3.0, 15.0)
Recognized Language Codeen

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-21 UTC.