Typewriter Effect - How to Add One to Any Website

You want text on your site that types itself out, deletes, and types something new. The classic typewriter effect. Most tutorials tell you to write 50 lines of JavaScript or install a library like Typed.js. You can skip all of that.
The demo above is live - that text is typing and cycling through strings right now. You can have the same thing on your site in under a minute.
What is a typewriter effect?
A typewriter effect (also called a typing animation) makes text appear character by character, as if someone is typing it in real time. When it finishes one string, it deletes and types the next one. You see it on hero sections, taglines, job titles, and feature highlights.
It draws attention to specific words because movement catches the eye. A heading that says "We build fast websites" is fine. A heading where "websites" types out, deletes, and becomes "applications", then "experiences" - that keeps people watching.
How do you add a typewriter effect to a website?
Two steps. First, add the OneType Transforms script tag to your site:
<script src="https://cdn.transforms.onetype.ai/script/57095981335841558d328d599e6f5322.js"></script>
Second, wrap your strings in span elements inside an element with the ot="typewriter" attribute:
<p>I love <span ot="typewriter"><span>building websites</span><span>writing code</span><span>designing interfaces</span></span></p>
That is it. The text starts typing the first string, deletes it, types the second, and cycles through all of them. No JavaScript to write, no CSS keyframes, no library to configure.
Each child span is one string in the rotation. Add as many as you want - the animation cycles through all of them in order.
Can you customize the typewriter animation?
Yes. Everything is controlled through HTML attributes on the same element. Here are all the options:
Typing speed - control how fast characters appear. Default is 50ms per character. Lower is faster:
<span ot="typewriter" ot-speed="30"><span>Fast typing</span></span>
Delete speed - how fast characters are removed. Default is 30ms. Set it separately from typing speed:
<span ot="typewriter" ot-back-speed="15"><span>Quick delete</span></span>
Pause before deleting - how long the text stays visible before the backspace starts. Default is 1000ms (1 second):
<span ot="typewriter" ot-back-delay="2000"><span>Stays visible for 2 seconds</span></span>
No cursor - hide the blinking cursor for a cleaner look:
<span ot="typewriter" ot-cursor="false"><span>No cursor here</span></span>
Custom cursor character - change the cursor from the default pipe to anything:
<span ot="typewriter" ot-cursor-char="_"><span>Underscore cursor</span></span>
Disable loop - type all strings once and stop on the last one:
<span ot="typewriter" ot-loop="false"><span>Types once and stops.</span></span>
Shuffle - randomize the order of strings on each cycle:
<span ot="typewriter" ot-shuffle="true"><span>Option A</span><span>Option B</span><span>Option C</span></span>
What is smart backspace?
Smart backspace is enabled by default. When consecutive strings share a common prefix, only the different part gets deleted and retyped. Watch this example:
<p>We build <span ot="typewriter"><span>fast websites</span><span>fast applications</span><span>fast experiences</span></span></p>
Instead of deleting "fast websites" completely and retyping "fast applications" from scratch, it only deletes "websites" and types "applications". The shared "fast " prefix stays. It looks like a real person editing text - much more natural than full delete-and-retype.
Disable it with ot-smart-backspace="false" if you want the full delete-retype behavior.
How do inline pauses work?
Add ^1000 anywhere in a string to pause for 1000 milliseconds (1 second) at that point. The number is the pause duration in ms.
<span ot="typewriter" ot-loop="false"><span>Initializing^800... ready^500... launching!</span></span>
This types "Initializing", pauses 800ms, types "... ready", pauses 500ms, then types "... launching!". Stack multiple pauses anywhere in the text for precise timing control. Great for terminal-style sequences or dramatic reveals.
Does it work on Webflow, WordPress, and Shopify?
Yes. It works on any website that lets you add custom HTML. Here is a quick overview for the most popular platforms:
Webflow
Paste the script tag in Site Settings > Custom Code > Footer Code. Then add an Embed element with the typewriter HTML. Requires a Basic plan or higher.
WordPress
Install the free WPCode plugin and paste the script tag in Header & Footer > Header. Then use a Custom HTML block in the Gutenberg editor. Works on any self-hosted WordPress site.
Squarespace
Add the script tag in Website > Website Tools > Code Injection > Header. Use a Code Block (set to HTML, Display Source off) for the typewriter markup. Requires a Core plan or higher.
Shopify
Add the script tag in theme.liquid before the closing head tag. Then use a Custom Liquid section in the theme editor. Works on Basic plan and up.
Framer
Add the script tag in Settings > General > Custom Code > End of head tag. Use an Embed component for the typewriter HTML. Requires a Basic plan or higher.
The same approach works on Elementor, Wix, Framer, static HTML sites, or any platform where you can add custom code.
Is the typewriter effect free?
Yes. The typewriter transform is completely free. No account needed, no token, no restrictions. Just add the script tag and use it.
It is part of OneType Transforms - a collection of drop-in interactive components for websites. Some transforms are free (like this one), and there are premium ones too. Premium transforms need a paid plan (their pricing).
Typewriter effect vs writing it yourself in CSS or JavaScript
A pure CSS typewriter effect is possible with keyframe animations, but it only works for a single fixed string. You cannot cycle through multiple strings, delete, or retype with CSS alone. The moment you need multiple strings or any interactivity, you need JavaScript.
Writing it in JavaScript from scratch means handling character-by-character typing, delete timing, cursor blinking, loop logic, and edge cases like smart backspace. Libraries like Typed.js do this, but they still require JavaScript initialization, configuration objects, and npm or CDN setup.
OneType wraps all of that into HTML attributes. Same result, zero code to write. If you need to customize it later, you change an attribute instead of editing a script. The CSS approach works for simple single-string animations, but for anything dynamic, the attribute-based method is faster to implement and easier to maintain.
Full configuration reference
Every option with its default value:
- ot-speed - typing speed in ms per character (default: 50)
- ot-back-speed - delete speed in ms per character (default: 30)
- ot-back-delay - pause before deleting in ms (default: 1000)
- ot-start-delay - delay before typing starts in ms (default: 0)
- ot-loop - cycle through strings continuously (default: true)
- ot-cursor - show blinking cursor (default: true)
- ot-cursor-char - cursor character (default: |)
- ot-smart-backspace - only delete the part that changes (default: true)
- ot-shuffle - randomize string order (default: false)
Combine any of these together:
<span ot="typewriter" ot-speed="30" ot-back-speed="15" ot-back-delay="2000" ot-cursor-char="_" ot-shuffle="true">
<span>Option A</span>
<span>Option B</span>
<span>Option C</span>
</span>
Get started
Grab the script tag from transforms.onetype.ai/get-started, paste it into your site, and add a typewriter effect anywhere with the ot="typewriter" attribute. Free, no account needed.
Want to see all available transforms? Browse the full collection at transforms.onetype.ai.

