Regular languages can be represented by finite automata and by railroad diagrams. These two visual forms can be converted to each other. Context-free languages can also be described by (finite sets of) railroad diagrams. Based on the analogy we develop a new type of automata, the fractal automata: they accept the context-free languages. Relations between pushdown automata and fractal automata are also established.