Local business schema (JSON-LD) for a small business site: the key fields and 3 mistakes a JSON check misses
Once its trailing comma was fixed, a bakery's block with three mistakes passed Python's and PowerShell's JSON checks; Schema Markup Generator named each one, then split the lunch break into two entries.
We make Schema Markup Generator, the app this guide uses. The free methods come first; every step shown in Schema Markup Generator was checked in the app itself, and the screenshots come from the real app with invented sample data.
Short answer
Google requires two properties for a local business, its name and its postal address; the ones that matter next are the phone number with the country code, coordinates with at least five decimal places, opening hours as openingHoursSpecification, the address (url) of the location's page and the most specific type, such as Bakery. You can write the block by hand with no account, but a JSON check only catches typing errors: on our hand-written bakery block, Python and PowerShell found a trailing comma, then accepted a phone number without the country code, coordinates with three decimals and a closing time of 24:00. Schema Markup Generator flagged all three in plain words and marked the block ready only after the fixes.
What Google uses from LocalBusiness markup
Google's page on local business structured data lists two required properties, name and address (a PostalAddress), and a set of recommended ones. These are the rules a small business site most often gets wrong:
- Type: use the most specific LocalBusiness type, such as Restaurant or DaySpa; schema.org's LocalBusiness page lists many more, such as FoodEstablishment, and the FoodEstablishment page lists Bakery.
- telephone: include the country code and the area code.
- geo: latitude and longitude with at least 5 decimal places.
- openingHoursSpecification: times in hh:mm:ss format (Google's examples write hh:mm). In Google's examples, a business open all day closes at 23:59 (opens 00:00); a day closed all day has opens and closes both at 00:00; hours past midnight go in one entry, such as 18:00 to 03:00; seasonal hours use validFrom and validThrough.
- url: a working link to the page of this location. priceRange: under 100 characters, such as a numerical range or "$$$".
- Ratings and reviews: recommended only for sites that collect reviews about other local businesses, so a bakery's site leaves its own star rating out.
The page's first sentence mentions people searching for businesses on Google Search or Maps; nowhere does it say that the markup adds a business to Google Maps or to a Business Profile.
Method 1 (free): write it by hand and check the JSON
The block is plain text inside a <script type="application/ld+json"> tag in the page, so any editor will do and nothing needs an account. Here is a hand-written block for an invented bakery, with four mistakes in it; we saved it as bakery-broken.json to check it:
{
"@context": "https://schema.org",
"@type": "Bakery",
"name": "Harbour Lane Bakery",
"telephone": "0117 496 0123",
"address": {
"@type": "PostalAddress",
"streetAddress": "12 Harbour Lane",
"addressLocality": "Bristol",
"postalCode": "BS1 9ZZ",
"addressCountry": "GB"
},
"geo": {"@type": "GeoCoordinates", "latitude": 51.451, "longitude": -2.599},
"openingHoursSpecification": [
{"@type": "OpeningHoursSpecification", "dayOfWeek": "Saturday", "opens": "08:00", "closes": "24:00"},
]
}
Python's json module checks the syntax. We ran it on 30 November 2026 (Python 3.11.9, Windows 11), from the folder that holds the file:
py -3 -m json.tool bakery-broken.json
Expecting value: line 16 column 3 (char 524)
Line 16 is the closing bracket: after the comma at the end of line 15, Python expected another value. Windows PowerShell 5.1 does the same check with ConvertFrom-Json:
Get-Content -Raw bakery-broken.json | ConvertFrom-Json
It stopped with an error in the system's language (French on our test PC): an extra trailing comma in an array, at character 540 (counted with the file's Windows line ends), followed by the whole text of the file. With the comma removed, both commands accepted the file: json.tool printed it and ended with exit code 0, and ConvertFrom-Json read telephone 0117 496 0123, latitude 51.451 and closes 24:00 without a word. A JSON parser checks that the text is JSON; it does not know Google's rules, so the other three mistakes stay:
- "0117 496 0123" has no country code: for a UK number, +44 117 496 0123.
- 51.451 and -2.599 have three decimals, not five.
- "24:00" for a Saturday that ends at midnight: Google's examples end such a day at 23:59, and the app's rule says 24:00 is not a time of day.
Google's Schema Markup Testing Tool page points to two online checks, the Rich Results Test and the Schema Markup Validator; we did not run them on this example. Online generators such as Elfsight's and Common Ninja's build the block from a form and say no sign-up is needed; we did not use them either.
Method 2: fill in a form with Schema Markup Generator
Schema Markup Generator is our Windows app for structured data: forms for products, FAQs, articles, events and local businesses, required and recommended fields checked as you type, and JSON-LD ready to paste, offline. Its window says which version of Google's rules it checks against (6 November 2026 in the build we tested) and that meeting them makes a page eligible, never a promised rich result. The screenshots below come from version 1.0.0 (evaluation build), with the same invented bakery.
- Set the site defaults once: the site address, the organization, the logo, the currency (GBP), the country (GB) and the language. Relative addresses, such as /img/bakery-counter.jpg, use the site address.
- Add a local business and pick its type, Bakery, then fill in the form. Each field says what it wants: under Phone, "with the country code, for example +44 20 7946 0000". Opening hours are lines such as
Mo-Fr 07:30-13:00, 14:00-18:00, one per group of days, withSu closedfor a closed day. - Read the findings. With the same three mistakes typed in, the item was marked "needs fixes", with "start with + and the country code, for example +44 20 7946 0000", "give at least 5 decimal places (about 1 m), for example 51.50735" and "hours line 2: write 23:59 for midnight (24:00 is not a time of day)".
- Fix them and copy the block. With +44 117 496 0123, 51.45123 / -2.59876 and Saturday 08:00-16:00, the status turned to "ready", with 0 errors, 0 warnings and one note: "a restaurant's cuisine ("servesCuisine") is recommended". Copy put the whole script block on the clipboard; Save .html saved it as a file.


We read the saved file back. The opening hours with a lunch break became two entries for the same days, and Sunday, typed as closed, has no entry at all (Google's page also allows marking a closed day with opens and closes both at 00:00). The coordinates were written as text, in quotes; schema.org accepts a number or text for latitude and longitude, and Google's examples use numbers:
"geo": {
"@type": "GeoCoordinates",
"latitude": "51.45123",
"longitude": "-2.59876"
},
"openingHoursSpecification": [
{ "@type": "OpeningHoursSpecification",
"dayOfWeek": ["https://schema.org/Monday", ... "https://schema.org/Friday"],
"opens": "07:30", "closes": "13:00" },
{ "@type": "OpeningHoursSpecification",
"dayOfWeek": ["https://schema.org/Monday", ... "https://schema.org/Friday"],
"opens": "14:00", "closes": "18:00" },
{ "@type": "OpeningHoursSpecification",
"dayOfWeek": "https://schema.org/Saturday",
"opens": "08:00", "closes": "16:00" }
]
The file lists the five weekdays in full; the dots above shorten it. For product pages rather than a shop's address, see our guide to Product JSON-LD for many products from a CSV.
Limitations
- A JSON parser (Python's json.tool, PowerShell's ConvertFrom-Json) finds typing errors only, and stops at the first one. PowerShell 5.1 gives a character position, not a line.
- Schema Markup Generator checks against Google's rules as of the date shown in its window. Meeting them makes a page eligible; whether Google shows anything is Google's decision.
- We tested one invented business with one location, and did not run the Rich Results Test, the Schema Markup Validator or any online generator.
- Schema Markup Generator's planned requirements: Windows 10 (22H2) or 11, 64-bit.
References
- Google Search Central: Local business (LocalBusiness) structured data
- Google Search Central: Schema Markup Testing Tool
- schema.org: LocalBusiness
- schema.org: FoodEstablishment
- Python documentation: json
- Microsoft Learn: ConvertFrom-Json
- Elfsight: Local Business Schema Generator
- Common Ninja: Free Local Business Schema Generator