Write LocalBusiness JSON-LD from your real name, address and hours, add it to your site, and test it with Google's Rich Results Test.
Who it is for
Owners of a local business website with a physical address and set hours. Use only details that are true and shown on your site. Skip it if you cannot edit your page's code or ask your site manager.
Tools
ChatGPT or Claude to draft the code
Your business name, address, phone number and opening hours
Google's Rich Results Test
Someone who can paste code into your site
Steps
Write down your real details exactly as they appear on your site: business name, full address, phone, hours.
Ask the assistant to draft JSON-LD with the prompt below. Google's page lists name and address as required for LocalBusiness and hours as recommended.
Compare the draft with Google's example on its LocalBusiness page. Check every value against your own details.
Test the code before it goes live. Google says the Rich Results Test can check a code snippet, and supports JSON-LD, RDFa and Microdata.
Remove any comments from the JSON-LD before you publish. Google's help says the test ignores them but they can cause errors on a live page.
Add the code to your page, run the test on the live URL, and fix errors first and warnings second.
Google also recommends submitting a sitemap so it learns about changes. AI assistants using this markup: Not stated in sources.
The prompt
Write LocalBusiness JSON-LD for my website. Use only the details below. Leave out any field I do not give you.
Business name: [NAME]
Business type: [for example: Plumber, Dentist, Restaurant]
Street: [STREET]
City: [CITY]
State or region: [STATE]
Postal code: [ZIP]
Country: [COUNTRY]
Phone: [PHONE]
Website: [URL]
Hours: [DAYS AND TIMES]
Rules:
- Output one JSON-LD script block and nothing else.
- Do not add reviews, ratings, prices, awards or geo coordinates unless I give them.
- No comments inside the code.
- After the code, list each field and the detail it came from.
Tips
Google says LocalBusiness is a subtype of Organization and suggests following the Organization fields too.
Fix errors first. Google says fixing warnings can help quality but is not required.
Update the code when your hours or address change.