LocalBusiness JSON-LD: the basics, and how to test it
Labels in your page's code that say who you are and where. Search engines document that they read them.
Your home page says your business name, your address and your phone number in big friendly type. A person reads that instantly. Software has to guess which line is the name and which is a street. Structured data removes the guessing: you add a small block of code that labels each fact. This page covers the most common kind for a small business, schema.org LocalBusiness, written as JSON-LD.
Three terms, defined
- schema.org is a shared vocabulary of types (like
LocalBusinessorPlumber) and properties (liketelephone). Its founding companies were Google, Microsoft, Yahoo and Yandex, and it's now developed through a W3C community group. - Structured data is information written in that vocabulary so a machine can read it without guessing.
- JSON-LD is one way to write it: a block of text inside a
<script type="application/ld+json">tag. Google supports three formats (JSON-LD, Microdata and RDFa) and says it generally recommends JSON-LD. It sits in one block instead of being mixed through your page's HTML, so it's the easiest to add and fix.
Pick the most specific type
LocalBusiness is the general type, defined by schema.org as a particular physical business or branch of an organization. It has many more specific subtypes, and Google's documentation says to use the most specific one you can. A few that exist on schema.org:
HomeAndConstructionBusiness, with subtypes such asPlumber,Electrician,HVACBusiness,RoofingContractor,GeneralContractor,HousePainterandLocksmithHealthAndBeautyBusiness, withHairSalonandBeautySalonFoodEstablishment, withRestaurantand othersAutomotiveBusiness, withAutoRepairDentist
If nothing fits, plain LocalBusiness is fine. Don't pick a type just because it sounds impressive.
What Google requires and recommends
Google's LocalBusiness documentation lists two required properties:
name: the business name, as customers see it.address: aPostalAddress, with as many parts filled in as you can (street, city, region, postal code, country).
It recommends several more. The ones that apply to most small businesses:
telephone, including country and area code.url, the address of the page for this location.geo, latitude and longitude. Google says the precision must be at least 5 decimal places.openingHoursSpecification, your hours. (Getting these right, including holidays, is a topic of its own.)priceRange, either a range like$10-15or dollar signs like$$. Google says it must be shorter than 100 characters.
Google's separate Organization documentation adds logo (at least 112 by 112 pixels) and sameAs, which lists other pages about the same business, such as your social media profiles. Google suggests putting Organization markup on the home page or one page about the business; it doesn't need to be on every page.
A working example
This is for a made-up plumber. Replace every value with your own. Leave out anything you don't have rather than inventing it.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Plumber",
"name": "Example Plumbing Co.",
"url": "https://example.com/",
"telephone": "+1-555-555-0100",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Main St",
"addressLocality": "Anoka",
"addressRegion": "MN",
"postalCode": "55303",
"addressCountry": "US"
},
"geo": {
"@type": "GeoCoordinates",
"latitude": 45.19774,
"longitude": -93.38718
},
"openingHoursSpecification": [{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Monday","Tuesday","Wednesday","Thursday","Friday"],
"opens": "08:00",
"closes": "17:00"
}],
"priceRange": "$$",
"sameAs": ["https://www.facebook.com/exampleplumbing"]
}
</script>
Paste it into your home page's HTML, either in the <head> or just before </body>. Most website builders have a "custom code" or "header code" box for this. The AgentReady generator on the home page writes a starting version from a short form.
Rules that trip people up
- Only mark up what's on the page. Google's general structured data guidelines say not to add structured data about information that isn't visible to the user, even if it's accurate. If your phone number is in the JSON-LD, it should be on the page too.
- Don't mark up your own reviews. Google's review snippet documentation says that if a business controls the reviews about itself, its pages using LocalBusiness or Organization markup are not eligible for review stars. Copying your Google reviews into
aggregateRatingwon't earn stars, and Google's guidelines say markup for reviews not written by real users can lead to a manual action. - Valid doesn't mean guaranteed. Google says plainly that it doesn't guarantee features that use structured data will show up. Markup makes you eligible; Google decides what appears.
- One business, one set of facts. The name, address and phone in your markup should match your Google Business Profile and the page text exactly.
How to test it
There are two free tools, and they answer different questions.
- Google's Rich Results Test (search.google.com/test/rich-results). Paste your page address, or choose "Code" and paste the snippet. It runs as a smartphone crawler by default. It tells you whether the markup is readable and whether it qualifies for the specific Google search features it covers. Errors mean the markup is broken or the page couldn't be reached; fix those first. Warnings mean the test couldn't load some of the page's resources (images, CSS or scripts), so the results may be incomplete. Click into each item to see details.
- The Schema Markup Validator (validator.schema.org), run by schema.org. It replaced Google's old Structured Data Testing Tool in 2021. It checks that the markup is valid schema.org in general, without judging it against any one company's search features. Use it when the Rich Results Test says "no items detected" for a type Google doesn't have a feature for.
After the page is live, Google's documentation suggests using the URL Inspection tool in Search Console to confirm Google has seen the markup on the real page.
Common mistakes we see in pasted page source
- Curly "smart" quotes from a word processor instead of straight quotes. JSON won't parse, and the whole block is skipped. The AgentReady page check flags blocks that don't parse.
- A comma after the last item in a list. Same result.
- Two different business names: the legal LLC name in markup, the trade name on the page. Pick the one customers see.
- Markup left over from a theme demo, describing a business that isn't yours. View your page source and search for
ld+jsonto see what's there now.
Sources
- Google Search Central: Local business (LocalBusiness) structured data
- Google Search Central: Introduction to structured data markup
- Google Search Central: General structured data guidelines
- Google Search Central: Review snippet
- Google Search Central: Organization structured data
- Google Search Console Help: Rich Results Test
- Schema.org blog: Announcing Schema Markup Validator (May 21 2021)
- schema.org: About
- schema.org: LocalBusiness
- schema.org: HomeAndConstructionBusiness (and Plumber, Electrician, HVACBusiness, RoofingContractor, GeneralContractor, HousePainter, Locksmith pages)
- schema.org: HairSalon, BeautySalon, AutoRepair, Dentist
Checked October 2026.