Make a After Effects typewriter effect with blinking cursor

At some point in any video and motion graphic project, you will probably need to figure out how to make a text type writing animation with cursor. And it may surprise you to know that it is not as easy as it seems. For that reason, I have decided to write this blog so no one has to spend hours making a typing text animation in After Effects.

In this post, I will show you multiple methods to make a typewriter effects animation with and without a blinking cursor and provide the After Effects projects template and presets for free. I completely understand that sometimes you don’t have the time or luxury to even watch a tutorial and you need to get your project out the door. I have been in this situation, so I am here offering the shortcut. If you find this helpful and informative, please like the page 🙂

Let’s start with the basics for the beginners. Here the simplest and fastest way to create a typewriter effect in After Effects without a cursor. Follow these steps- it takes only 20 seconds.

  1. Create a new composition
  2. Click on the T icon and type your text
  3. Open Effects & Presets window
  4. Search the “Typewriter” presets
  5. Select Typewriter and drag to your text
  6. Boom! If you press play, the text should animate with the typing animation

See the demo below for visual reference:

To achieve this After Effects type animation with a cursor, we actually won’t use the default typewriter presets just because the expression is much more powerful than the regular typewriter preset. This whole article is based on my research online, so if you are the programmer of this awesome After Effects typewriter with cursor expression, I’ll be happy to link this blog to your website and give you the proper credit.

Demo of the typewriting animation with cursor below
Typing text-with cursor in after effects

I have created 4 ways to learn this After Effects typing effect. Just choose the one that best fits you.

  • Instructions
  • Video Tutorial
  • Free After Effects project file (at the end of this article)
  • Free typewriter with cursor preset (at the end of this article)

Instructions

  • Create a new composition
  • Select T (Horizontal Type Tool CTRL+T)
  • Type your text
  • Open the Effects & Presets windows
  • Search for Slider Control
  • Drag and drop Slider control on your text layer
  • Rename the slider control to Speedrename control slider after effects
  • Go to Source Text
  • Alt click on the Stop Watch icon to add a expression
  • Copy and paste this expression
    L = text.sourceText.length;
    It = time – thisLayer.inPoint;
    T = It*effect(“Speed”)(“Slider”);
    F = Math.round( It % 1);if(F==1 |(T0)){Fl=”|”;}else{Fl=” “;}substr(0,T) + Fl
  • Increase the slider control speed (this defines how fast the text is typing)
  • Press Play and you should see you your text typing with the blinking cursor

Video Tutorial

Free Typewriter Effect After Effects template

Free After Effects typewriter with cursor preset FFX

Adding color to the cursor of this typing animation is actually easy once you know where to add the expression.

Demo of the typewriter animation with blinking colored cursor below

Below I have created 4 ways to learn this After Effects typing effect with a colored cursor. Just choose the one that works best for you.

  • Instructions
  • Video Tutorial
  • After Effects project file (at the end of this article)
  • Typewriter with with color cursor preset (at the end of this article)

Instructions

  • Create a new composition
  • Select T (Horizontal Type Tool CTRL+T)
  • Type your text
  • Open the Effects & Presets windows
  • Search for Slider Control
  • Drag and drop Slider control on your text layer
  • Rename the slider control to Speed
  • Go to Source Text
  • Alt click on the Stop Watch icon to add a expression
  • Copy and paste this expression
    L = text.sourceText.length;
    It = time – thisLayer.inPoint;
    T = It*effect(“Speed”)(“Slider”);
    F = Math.round( It % 1);if(F==1 |(T0)){Fl=”|”;}else{Fl=” “;}substr(0,T) + Fl
  • Increase the slider control speed to 20 (this defines how fast the text is typing)increase type speed
  • Now if you  press play, you should see you your text typing with the blinking cursor
  • Let’s make the blinking cursor bar a different color
  • Click on the animate arrow and choose Fill > RGBfill RGB color blink cursor
  • Expand Range Selector 1
  • Alt click on the Start stop watch and add this expression below:
    text.animator(“Animator 1”).selector(“Range Selector 1”).end-1
  • Alt click on the End stop watch and add this expression below:
    text.sourceText.length
  • Expand Advanced
  • Change unit from Percentage to Indexstart end index cursor expression
  • Now play. You should the the text typing with a red blinking cursor color.
  • Obviously now you can change the cursor to a different color by changing the Fill Color

Video Tutorial

Download Free After Effects typewriter project template file below

Download Free After Effects typewriter with cursor preset FFX below

I have actually created 2 cool After Effects template projects if you are looking for a way to show a typing text on a web search, check out below

Web Search Typing Text After Effects Google Search After effects Template
2018-07-06T23:08:00+00:00

17 Comments

  1. Emi 05/15/2018 at 7:31 am - Reply

    Hi,
    I just tried it buts its been giving me an error message.. ” Expression disabled. Error at line 2 in property ‘source text’ of layer 1… syntax error”

    • spearz 05/20/2018 at 5:34 am - Reply

      same here. how to fix it

      • Kay 06/01/2018 at 9:14 pm - Reply

        I had the same issue but I think this comes up if you’re not using the latest version of AE. I was using CS6 and thus ran into this issue. I downloaded a free trial of CC and it worked.

        • Michelle 10/05/2018 at 3:03 pm - Reply

          I had to retype the entire thing in notepad or something similar so that it didn’t use special characters. All the quotation marks, semi-colons, etc are pasting in as unicode characters that breaks the expression. Pasting in the comments like the user below also changes the characters to special ones that break it. Just in case anyone else has this issue!

  2. Umar 05/23/2018 at 12:49 am - Reply

    how to apply typing effect in blogger any body help me?

  3. Silke 06/01/2018 at 5:59 am - Reply

    Some wrong “-” signs and quotes have crept their way into the sample code. Maybe the blog software? This worked for me: L = text.sourceText.length;
    It = time – thisLayer.inPoint;
    T = It*effect(“Speed”)(“Slider”);
    F = Math.round( It % 1);
    if(F==1){
    Fl=”|”;}
    else{
    Fl=””;}
    substr(0,T) + Fl;

  4. MotionIsland 06/01/2018 at 9:26 pm - Reply

    Guys thanks so much for helping, please get the latest version of After Effects, I had no error when I have uploaded these files. If you get an expression error it might be either your after effects version or the language, I haven’t use universal expression for these files. Hope this help. Good Luck

  5. Lia Lim 07/12/2018 at 9:59 am - Reply

    hello, thanks for creating this. You helped me out a lot…
    Is there a way to make the blinking line thinner? for example if the font is in medium, what expression would I write to use a light font for the blinking or even, make the blinking 50% opacity?
    Anyways, if I don’t hear from you. I still very much appreciated your generosity. Lia

    The updated script here worked with cc2018.

    L = text.sourceText.length;
    It = time – thisLayer.inPoint;
    T = It*effect(“Speed”)(“Slider”);
    F = Math.round( It%1);
    if(F==1 | (T0)){Fl = “|”;} else{Fl=” “;}
    substr(0,T) + Fl?

    _________________________________________________

    • Carolin 08/12/2018 at 9:54 pm - Reply

      I wonder the same thing!

  6. David 07/19/2018 at 3:33 pm - Reply

    I’m on the latest AE and have tried pasting all of your codes but to no avail! Any ideas?

  7. David 07/19/2018 at 3:34 pm - Reply

    I’ve tried everyone’s code on the latest AE but keep getting syntax errors…. can someone post a screenshot of the code? Maybe this blog site’s coding is messing up the syntax?

  8. John 10/30/2018 at 1:54 am - Reply

    I copied this from the youtube video, looks like something was left out there. Also, re-type the ‘quotation marks’ if you still get the error. After effects version had nothing to do with the error.

    L = text.sourceText.length;
    It = time – thisLayer.inPoint;
    T = It*effect(“Speed”)(“Slider”);
    F = Math.round( It % 1);
    if(F==1 |(T0)){Fl=”|”;}else{Fl=” “;}
    substr(0,T) + Fl

  9. SUFFERING IN PAIN 01/21/2019 at 4:54 pm - Reply

    CAME ON !!!!!!!!! ALMOST 2 hours to solve the problem …………

    GUYS SPEED and Speed are not the same … USE CAPITAL LETTERS FOR VARIABLES CHANGED MY MIND

  10. Roland 01/22/2019 at 5:15 am - Reply

    How can you make the cursor keeps the same color in different lines
    It only has his own color in the first line
    The next lines it changes to the text color

  11. n00dlz 02/06/2019 at 9:55 pm - Reply

    My text just disappears, what steps am I missing?

  12. Johannes 02/13/2019 at 4:28 am - Reply

    Guys, try this expression:

    L = text.sourceText.length;
    It = time – thisLayer.inPoint;
    T = It*effect(“Speed”)(“Schieberegler”);
    F = Math.round( It % 1);
    if(F==1|(T,0)){Fl=”|”;}else{Fl=” “;}
    substr(0,T) + Fl

  13. Emma 02/14/2019 at 9:39 am - Reply

    Hi! I have a question. When the cursor blinks when the text is completed, the whole sentence moves left and right each time it blinks. Does anyone know how to fix this? Thanks 🙂

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.