R.L. Stine is a writing machine.

Stine is the author of “Goosebumps” and other series for young readers that have sold more than 350 million copies in 32 languages and inspired television shows, merchandise, a theme park attraction and a Wii game.

For many kids, Stine’s mildly scary books are their first step up from picture books.

“Goosebumps,” which still sell several hundred thousand copies a month, celebrated its 20th anniversary in July. Stine writes six “Goosebumps” books a year, as well as at least one book for adults. He will make an appearance at the National Book Festival in Washington later this month. Stine spoke about how, what and why he writes.

R.L. Stine is the author of the popular “Goosebumps” series of children’s books. (By Dan Nelken)

You’ve sold millions of books. Why is the “Goosebumps” series so popular?

The secret of “Goosebumps” . . . was it was the first book series to appeal equally to boys and girls. . . . In fact, these books were originally done for a girl audience. And then the fan mail started coming in, and it was half from boys. I have a boy and a girl in every book. . . . [The books are] aimed at 7-to-12-year-olds. Second-graders can read them.

There’s little outright cruelty in your stories. Where do you draw the line in terms of what’s appropriate?

I have some rules. No one ever dies in a “Goosebumps” book. If there happen to be ghosts and they are dead, it happened before the book starts. And I don’t do any real serious problems. Kids have to know this is a creepy fantasy and it couldn’t really happen.

When you write, for example, about a hideous mask that the heroine can’t take off, are you writing about some deeper theme?

I didn’t really think of that. When my son was little, he was trying on a green Frankenstein mask and he was pulling it down over his face and he couldn’t get it off. And he was tugging, tugging. I thought, “What a great idea for a story.” I should’ve helped him. I wasn’t a good parent that day.

Do you still claim the title of “the world’s best-selling children’s author”?

I think J.K. Rowling has passed me by. I’m No. 2 now.

What were you into when you were the age of your readers?

I was a very shy kid, very fearful of a lot of things, which is bad when you’re a kid but now it’s very helpful. I can remember that feeling of panic and try to convey that in the books. When I was 9 or 10, I just started staying in my room and typing these stories.

What do kids say when they write to you?

That’s one of the best parts of writing for kids. I get wonderful mail, tons and tons. Here’s a couple classic letters:

“Dear R.L. Stine, I really love your books but can you answer one question, why don’t the endings make any sense?”

“Dear R.L. Stine, I’m huge fan of your books. Your friends and family are proud of you, no matter what anybody says.”

“Dear R.L. Stine, I’ve read 40 of your books and I think they’re really boring.”

That’s my favorite.