Overview
Introduction
A sitelinks search box, the little search field Google sometimes shows directly under a homepage result, is driven by a single piece of markup on your homepage: WebSite JSON-LD with a nested SearchAction describing how to build a search URL from a query.
Hand-writing it means remembering the exact nested EntryPoint shape and the query-input string format, both easy to get subtly wrong. This generator builds the correct structure from a name, URL, and search URL template.
What Is Website Schema Generator?
A form-driven generator for WebSite JSON-LD, the schema.org type used to describe a website as a whole (as opposed to a single page or article), plus its optional potentialAction SearchAction for sitelinks search box eligibility.
The core WebSite fields (name, url, description) are always included; the SearchAction block is only added when the search-box toggle is on and a search URL template is supplied.
How Website Schema Generator Works
Name, url, and description map directly to their WebSite properties. When the SearchAction toggle is enabled, the tool wraps your search URL template in the nested target/EntryPoint/urlTemplate shape Google's documentation expects, and appends the fixed query-input string that tells Google which placeholder maps to the user's search term.
The output updates live as you type, and validates that your search URL template actually contains the literal {search_term_string} placeholder before allowing the SearchAction block to be generated.
When To Use Website Schema Generator
Adding baseline WebSite identity markup to a new site's homepage.
Enabling a sitelinks search box for a site that already has a working internal search feature reachable by a query-string URL.
Retrofitting structured data onto an existing homepage that has never had any JSON-LD.
Often used alongside Structured Data Validator, Organization Schema Generator and Software Application Schema Generator.
Features
Advantages
- Builds the exact nested target/EntryPoint/urlTemplate shape the SearchAction spec requires, instead of the flatter (and invalid) shape people often write by hand.
- Validates that the search URL template contains the required {search_term_string} placeholder before generating output, catching the single most common SearchAction mistake.
- Produces valid minimal WebSite markup even with the search box toggle off, for sites that just want basic site identity JSON-LD.
Limitations
- Doesn't verify that the search URL template actually returns search results when the placeholder is substituted; that's on you to test.
- Adding this markup doesn't guarantee Google will display the sitelinks search box; Google makes that call independently based on its own signals.
- Covers the WebSite type only, not the related Organization type that's often paired with it on a homepage; use the Organization Schema Generator alongside this for a fuller homepage markup set.
Examples
Best Practices & Notes
Best Practices
- Place this markup on the homepage only; it describes the site as a whole, not an individual page.
- Make sure the search URL template, with {search_term_string} replaced by a real query, actually returns matching results when tested manually.
- Keep the name field identical to your site's actual brand name as shown elsewhere on the page, since mismatches undermine the entity signal this markup is meant to send.
- Use HTTPS URLs throughout; a mixed-scheme urlTemplate on an HTTPS site is a common reason Google treats a SearchAction as untrustworthy.
Developer Notes
The target property is emitted as a nested { "@type": "EntryPoint", "urlTemplate": ... } object rather than a bare URL string, because that's the form shown in Google's own sitelinks search box documentation; some third-party validators tolerate a bare string for target, but matching Google's documented shape exactly is the safer choice.
Website Schema Generator Use Cases
- Enabling a sitelinks search box on a site's homepage for the first time
- Adding baseline WebSite identity JSON-LD to a newly launched site
- Auditing and rebuilding an existing SearchAction block that was hand-written incorrectly
Common Mistakes
- Forgetting the literal {search_term_string} placeholder in the search URL template, which silently makes the whole SearchAction invalid.
- Adding this markup to every page instead of just the homepage, which doesn't help and adds unnecessary duplicate JSON-LD sitewide.
Tips
- Run the generated output through the Structured Data Validator tool in this category to confirm Google can parse the SearchAction correctly.
- If your site doesn't have an internal search feature yet, leave the search box toggle off and generate plain WebSite markup instead; add the SearchAction later once search exists.