I am from Germany and I will go to Hungary in December. I wonder if I need to get any cash? Can I pay with credit / debit card (maestro + master card) in restaurants / cafés / tourist attractions?
My experience in Budapest earlier this year (2018) was that cards are accepted very widely and contactless payment also works. The funicular up to the castle takes cards but I did not try other public transport. I did find one restaurant slightly out of the way where card payment was not available but they took euros. I suggest you ask before ordering in restaurants just in case. The Dohány Street Synagogue takes cards as well.
Edited to include information from helpful comment from Márton Molnár that public transport also takes cards.
Having some cash available is highly recommended when traveling abroad.
For example a few months ago Visa systems crashed in Europe for some hours and some transactions made from abroad couldn't be completed.
If you don't want to exchange much cash (but you're going to pay for every conversion as others have noted), then I suggest to carry some cash with you for emergency purposes and using your card as the main mean of payment.