Build a custom OCR upload embed
Add a responsive Free-OCR.net uploader to your website, choose the OCR task and language, match the widget to the page, preview the result, and copy production-ready iframe code.
Customize the uploader
Every option updates the preview and generated code. Brand attribution and the privacy boundary remain visible in every version.
Live preview
The preview uses the exact query options placed in your code.
Copy the embed code
Paste it into the HTML where the uploader should appear.
How the embedded upload works
The host website provides the frame, while Free-OCR.net owns the upload, processing session, and private result.
- 1
Your visitor chooses a file
The file picker runs inside the Free-OCR.net iframe and accepts only formats supported by the selected tool.
- 2
The file goes directly to Free-OCR.net
The host page does not receive the file contents. A signed embed request starts a private OCR job.
- 3
The result opens on Free-OCR.net
The visitor follows a private first-party processing link, which avoids depending on third-party iframe cookies.
Optimize loading and layout
Use the smallest frame that keeps the controls comfortable and select the loading behavior from the widget’s position on the page.
Keep width responsive
Use width="100%" so the widget follows its container. Control the container width in your own layout instead of hard-coding a wide iframe.
Choose enough height
Compact widgets usually fit near 380 pixels. Standard and comfortable spacing need roughly 460 and 540 pixels. Increase the frame if translated browser controls wrap.
Load below-the-fold embeds lazily
Keep loading="lazy" when the uploader sits below introductory content. Choose eager loading only when it is the primary action visible immediately.
Keep the sandbox permissions
The generated sandbox allows the upload form, required scripts, and the private processing link. Avoid adding camera, microphone, or location permissions.
Install it safely
Most websites only need the generated iframe. Sites with a restrictive Content Security Policy must also permit the Free-OCR.net frame origin.
Content Security Policy example
Content-Security-Policy: frame-src 'self' https://free-ocr.net;If your policy uses child-src for older browsers, add the same origin there. Do not add unsafe-inline or unrelated permissions for this widget.
Customization reference
The builder creates these validated query parameters. Unsupported values fall back to safe defaults.
| Option | Purpose | Supported values |
|---|---|---|
tool | Selects the OCR task and accepted file formats. | Any one-file tool shown in the builder |
language | Sets the recognition language sent with the job. | Languages currently available in the builder |
theme | Changes the validated high-contrast color treatment. | light, soft, dark |
density | Changes internal spacing without changing functionality. | compact, standard, comfortable |
heading | Changes the visible widget heading. | Plain text up to 64 characters |
button | Changes the primary action label. | Plain text up to 32 characters |
help | Shows or hides the file-handling guidance. | 1 or 0 |