The Ultimate Guide to Spintax: Overview, Formatting, and Running Spintax in Google Sheets (and JavaScript in General)
{What is|what's} the deal with {airline food|the food they give you on airplanes}?
The Ultimate Guide to Spintax: Overview, Formatting, and Running Spintax in Google Sheets (and JavaScript in General)
Articles in Content Creation | By August R. Garcia
Published | Last Update
{What is|what's} the deal with {airline food|the food they give you on airplanes}?
6,165 views, 1 RAM, and 0 comments
A few weeks ago, Hash Brown posted a guide on how to generate bulk content with a variety of different terms using Excel, which can be found here:
- https://www.256kilobytes.com/content/show/731/using-excel-to-create-scale-able-content-for-ecommerce-and-other-related-tasks
As noted in a comment/reply to that article:
Also, this post reminds me of some code for running spintax in Google Sheets (or anywhere that JavaScript can be used). Will post as an article when I have a minute. Easily able to be combined with your method here if/when variance desired in the output.
The Ultimate Guide to Spintax
What is content spinning?
Content spinning is the act of randomizing content in a way that changes the phrasing, but that keeps the same meaning. This can be done in a fully-automated way, where a robot throws a thesaurus at your content, or it can be done with input from a human using what is know as spintax.
Depending on how the spin is performed, some spins may be grammatically incoherent, while others may be completely legiible rephrasings.
What is Spintax?
Spintax is a way of communicating to a content spinner how to spin the content. It can be used to achieve spins that are more readable and coherent than automated spins. The tool below can be used to run spintax.
An example of spintax is shown below.
Spintax Formatting
Spintax formatting consists of wrapping specific words or terms to spin in curly braces with different possible options for the output separated by the pipe character. For example:
- Sentence with Spintax:
If {you are|you're} looking for an aquarium filter from {an award winning|a trusted|a reputable} {brand|company}, Coralife {has you covered|is a solid choice|is worth checking out}.
If you are looking for an aquarium filter from an award winning brand, Coralife is a solid choice.
If you're looking for an aquarium filter from an award winning company, Coralife has you covered.
If you're looking for an aquarium filter from a trusted brand, Coralife is worth checking out.
Some implementations of spintax may support other markup, such as nested spintax. Since spintax itself is a crime against god, it should be noted that there are no real standards for spintax beyond the basic syntax shown above.
Implementing Spintax in JavaScript
// @param -- spintax. Required. String. A string of text marked up with spintax.
// @example -- run_spintax("{What is|what's} the deal with {airline food|the food they give you on airplanes}?")
function run_spintax(spintax) {
// Define a variable to store a REGEX that will match all spintax instances
var regex = new RegExp(/{([^{}]+?)}/);
// Loop through all spintax instances
while((to_spin = regex.exec(spintax)) !== null) {
// Break the current spintax match from a string into an array split on the pipe character
opts = to_spin[1].split("|");
// Get a random option from the spintax options
random = Math.floor(Math.random() * opts.length);
// Replace the full spintax string with the chosen option
spintax = spintax.replace(to_spin[0], opts[random]);
}
return spintax;
}
Implementing Spintax in Google Sheets
Custom functions can be added to Google Sheets using the built-in script editor. Implementing this specific script is very straightforward:
- Open a Google Sheets file
- Go to Tools --> Script Editor
- Copy paste the code from the "Implementing Spintax in JavaScript" step into the script editor
- Press Ctrl+S to save the code
- Go back to the spreadsheet and enter this code into a cell to verify the function has been added:
=run_spintax("{Here|This} is {very nice|good|some} spintax{.|!}")
For more information on the specifics of Google Apps/Sheets Scripts, this link is a good place to start.








Hash Brown (3 years ago) 🐏 ⨉ 1Posted by August R. Garcia 3 years ago
Edit History
• [2019-01-03 0:45 PST] August R. Garcia (3 years ago)• [2019-01-03 0:45 PST] August R. Garcia (3 years ago)
• [2019-01-03 0:45 PST] August R. Garcia (3 years ago)
• [2019-01-03 0:45 PST] August R. Garcia (3 years ago)
• [2019-01-03 0:45 PST] August R. Garcia (3 years ago)
• [2019-01-03 0:45 PST] August R. Garcia (3 years ago)
• [2019-01-03 0:45 PST] August R. Garcia (3 years ago)
🕓 Posted at 03 January, 2019 00:45 AM PST
- C U [Video] 28+ Methods to Make Money Online: The Ultimate Tier List from S-Tier through F-Tier
- C U [Ultimate Guide] Muh Copyright, Duplicate Content, Scrapers, and Enforcing Infringements
- C U [Video] 33 More SEO Questions Answered
- C U [ATTENTION CONTENT WRITERS] I know your job sucks, so I made a tool for you. The 256 Kilobytes Content Idea Ge...
- C U How to Make an Infographic In GIMP, A Written Guide and Video Timelapse
- C U [MatthewGraham] [Easy Trick] Google Sheets has a built in content spinner
- C U GIMP vs. Photoshop
- C U Testimonials are supposed to be proof of concept of your product/service, right? (edited for clarity)
- C U How to Add a Word Counter to MTurk Hits (as a Requester/Job Poster)
- C U The Ultimate Guide to Spintax: Overview, Formatting, and Running Spintax in Google Sheets (and JavaScript in G...
August Garcia is some guy who used to sell Viagra on the Internet. He made this website to LARP as a sysadmin while posting about garbage like user-agent spoofing, spintax, the only good keyboard, virtual assitants from Pakistan, links with the rel="nofollow" attribute, proxies, sin, the developer console, literally every link building method, and other junk.
Available at arg@256kilobytes.com, via Twitter, or arg.256kilobytes.com. Open to business inquiries based on availability.
Post a New Comment
To leave a comment, login to your account or create an account.
Do you like having a good time?
Register an Account
You can also login to an existing account or reset your password. All use of this site is subject to the terms of service and privacy policy.
Read Quality Articles
Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.
View Articles →
Argue with People on the Internet
Use your account to explain why people are wrong on the Internet forum.
View Forum →
Vandalize the Wiki
Or don't. I'm not your dad.
View Wiki →
Ask and/or Answer Questions
If someone asks a terrible question, post a LMGTFY link.
View Answers →
Make Some Money
Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.