Event Schema Generator (JSON-LD)
Enter the date, place, and tickets shown on the event page. The JSON-LD updates as you work and stays in this browser.
Enter the details
Add the details that identify what this page describes.
Where it happensSay whether the event is in person, online, or both, and where.
Event statusChange this when the event is cancelled, postponed, rescheduled, or moved online.
Organizer and performersName who runs the event and who appears at it.
Price and availabilityAdd the price and availability shown on the page.
What each engine usesReview the documented search feature requirements that apply to this business type.
Required for Google event: location, name, startDate
Recommended for Google event: description, endDate, eventStatus, image, location.name, offers, organizer, performer, previousStartDate
Live JSON-LD output
Most plugins and code fields want the version with the script tag. Use JSON-LD only when a field asks for the JSON by itself.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Event",
"name": "Example Trail Skills Workshop",
"description": "A fictional workshop used to demonstrate Event JSON-LD fields.",
"image": [
"https://example.com/images/trail-workshop.jpg"
],
"startDate": "2027-04-10T10:00:00-05:00",
"endDate": "2027-04-10T13:00:00-05:00",
"eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
"eventStatus": "https://schema.org/EventScheduled",
"location": {
"@type": "Place",
"name": "Example Community Hall",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Example Street",
"addressLocality": "Springfield",
"addressRegion": "IL",
"postalCode": "62701",
"addressCountry": "US"
}
},
"organizer": {
"@type": "Organization",
"name": "Example Works",
"url": "https://example.com/"
},
"offers": {
"@type": "Offer",
"name": "General admission",
"price": 25,
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"url": "https://example.com/events/trail-skills-workshop/"
}
}
</script>Add the code to your site
Copying the code is half the job. Choose where your site is built to see where the code goes, which version to copy and what to check so you do not end up with two blocks describing the same thing.
Before you paste, on any platform
- Open the live page, view its source and search for
application/ld+json. Many themes, plugins and site builders already add markup. - If a block already describes the same thing, correct that block or turn it off instead of adding a second one.
- Make sure every value in the code is also visible on the page.
- After you publish, test the live URL with the Schema checker and Google's Rich Results Test.
Choose your platform. Use the arrow keys to move between platforms.
WordPress block editor
Copy the "With script tag" version.
- Open the page or post in the block editor.
- Add a Custom HTML block, paste the code and update the page.
- View the published page source to confirm the
scriptelement is there. - For markup that belongs on every page, such as
Organization, use a child theme or a site-specific plugin instead of a block on each page.
WordPress removes script elements from the Custom HTML block for users without the unfiltered_html capability. On a single site, Administrators and Editors have it; on a multisite network, only Super Admins do.
Yoast SEO
Copy the "With script tag" version.
- Yoast already prints a connected graph, usually
WebSite,OrganizationorPerson,WebPage,ArticleandBreadcrumbList. Do not paste a second copy of those types. - For a type Yoast does not output on that page, such as
Product,EventorService, add the code in a Custom HTML block and point it at Yoast's entities with the same@idvalues. - To change or replace what Yoast prints, a developer uses the Yoast Schema API: the
wpseo_schema_graph_piecesfilter adds or removes graph pieces, andwpseo_schema_<class>filters change one piece, such aswpseo_schema_webpage. - To stop Yoast's schema output completely, Yoast documents returning
falsefrom thewpseo_json_ld_outputfilter. Only do this when another source will describe every page.
Put filter code in a child theme or a small custom plugin so a theme update does not remove it.
Rank Math
Copy the "With script tag" version.
- Rank Math adds its own JSON-LD, usually
WebSite,OrganizationorPerson,WebPage,ArticleandBreadcrumbList. Check the page source before adding anything. - Set the schema type for a post in Rank Math's Schema tab when one of its built-in types fits.
- Rank Math's Custom Schema Generator is a Pro feature. It builds the markup from fields in the interface, so copy the values from this tool into those fields instead of pasting the code.
- For a type Rank Math does not output, add the code in a Custom HTML block. To change Rank Math's own entities, a developer uses its filters, such as
rank_math/json_ldor an entity filter likerank_math/snippet/rich_snippet_article_entity.
Rank Math recommends keeping filter code in a rank-math.php file in the active theme; use a child theme so updates do not remove it.
Shopify
Copy the "With script tag" version.
- View the source of a live product page first. Many themes, including Dawn, already output
Productmarkup. - Duplicate your theme, then open Edit code on the duplicate so you can test safely.
- If the theme's block is missing something, merge the missing property into that block. In Dawn it is in
sections/main-product.liquid. - For a one-off addition, a Custom Liquid section can hold the
scriptelement. Publish the duplicate theme when the test page looks right.
The generated code describes one item. A product template serves every product, so replace fixed values with Liquid output, as the Shopify guide shows.
Wix
Copy the "With script tag" version.
- In the editor, open Pages & Menu, choose More Actions next to the page, then SEO basics.
- Open the Advanced SEO tab, choose Structured Data Markup, then Add New Markup.
- Paste the code, select Apply and publish the site.
Wix accepts JSON-LD only, one script element and one main type per markup, fewer than 7,000 characters each and up to five markups per page. Wix adds preset markup to Stores products, Bookings services, Blog posts and Events pages; customize those in SEO Settings instead of adding a second block.
Squarespace
Copy the "With script tag" version.
- For one page, open the Pages panel, hover over the page, select the gear icon, choose Advanced and paste the code into Page Header Code Injection.
- For markup that belongs on every page, such as
Organization, use the site-wide Header Code Injection field. - Save, then test the public URL.
Code Injection is available on the Core, Plus and Advanced plans and some legacy plans. Squarespace adds some markup of its own that cannot be edited or removed, so add only what is missing.
Webflow
Copy the "With script tag" version.
- Open the Pages panel, hover over the page and select the Settings icon.
- Add the code in one place: the Schema markup section or the page's custom code. Webflow advises against using both.
- On a Collection template page, bind each changing value to a Collection field so every item gets its own data.
- Save and publish, then test the published page.
Webflow's Schema markup field needs a paid Site plan or a paid Workspace. Reference, Multi-reference and Multi-image fields cannot be bound in schema markup.
HubSpot
Copy the "With script tag" version.
- For one page or post, open it in the editor, go to Settings, then Advanced, and paste the code into Head HTML.
- For markup that belongs on every page, such as
Organization, use Site header HTML in your website settings. - For blog posts that each need their own values, add the markup to the coded blog post template with HubL.
- Publish, then check the live URL.
Google Tag Manager
Copy the "With script tag" version.
- In your container, create a new tag and choose Custom HTML.
- Paste the code and add a trigger that fires only on the page or pages the markup describes.
- Use Preview to confirm the tag fires on the right page, then publish the container.
The tag adds the markup after the page loads, so a crawler has to render the page to see it. When you can edit the page's own HTML, that is the better home.
Any other site
Copy the "With script tag" version.
- Paste the code into the HTML of the page it describes. Google reads JSON-LD in the
heador thebody. - In a template that serves many pages, fill the values from each page's own data instead of fixed text.
- On a JavaScript framework such as Next.js or React, render the
scriptelement on the server so it is in the first HTML response. - Publish and test the live URL.
Some tools ask for the bare object instead of the full element. In that case copy the "JSON-LD only" version.
How to use this generator
- Replace every example value with details shown on the event page.
- Enter the start time in local time and choose its UTC offset.
- Choose in person, online, or both, then add the venue or the online URL.
- Run Check this code, then paste the script-tag version into the event page.
Where this code goes
Paste the script-tag version into the HTML of the page it describes, in the head or the body. Most site builders have a custom code or header field for this.
What this generator does
The form builds one Event JSON-LD node. The check compares it with the event requirements Google documents. It cannot confirm indexing or promise a displayed search result.