Standard classes
Here's an example using titlesec:
\documentclass{article}
\usepackage{titlesec}
\titleformat{\section}{\LARGE\bfseries}
\titleformat{\subsection}{\Large\bfseries}
\titleformat{\subsubsection}{\large\bfseries}
\titleformat{\paragraph}{\large\bfseries}
\titleformat*{\subparagraph}{\large\bfseries}
\begin{document}
\section{Test section}
\subsection{Test section}
\subsubsection{Test section}
\paragraph{Test section}
\subparagraph{Test section}
\end{document}
I used the simplified version of \titleformat (i.e., \titleformat*) since the only desired change was in size, but you can use the extended version if "bigger" changes are required. These are the default definitions for the standard classes (taken from the documentation):
\titleformat{\section}
{\normalfont\Large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\large\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}
\titleformat{\paragraph}[runin]
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titleformat{\subparagraph}[runin]
{\normalfont\normalsize\bfseries}{\thesubparagraph}{1em}{}
so you can make bigger changes. The following image shows both the standard sizes and the ones obtained with the above modifications:

And here's an exampe using the sectsty:
\documentclass{article}
\usepackage{sectsty}
\sectionfont{\LARGE}
\subsectionfont{\Large}
\subsubsectionfont{\large}
\paragraphfont{\large}
\begin{document}
\section{Test section}
\subsection{Test section}
\subsubsection{Test section}
\paragraph{Test section}
\subparagraph{Test section}
\end{document}
According to an edit to the original question, the OP wanted also a sans serif font:
\documentclass{article}
\usepackage{titlesec}
\titleformat{\section}{\LARGE\bfseries\sffamily}
\titleformat{\subsection}{\Large\bfseries\sffamily}
\titleformat{\subsubsection}{\large\bfseries\sffamily}
\titleformat{\paragraph}{\large\bfseries\sffamily}
\titleformat*{\subparagraph}{\large\bfseries\sffamily}
\begin{document}
\section{Test section}
\subsection{Test section}
\subsubsection{Test section}
\paragraph{Test section}
\subparagraph{Test section}
\end{document}
KOMA classes
The above approaches are to be used mostly with the default document classes (book, report, article); if the document class used is one of the classes of the KOMA-Script bundle, then it's not advisable to use titlesec (See Incompatibilities between KOMA-Script and titlesec) but to use the features provided by the KOMA classes:
\documentclass{scrartcl}
\setkomafont{section}{\LARGE}
\setkomafont{subsection}{\Large}
\setkomafont{subsubsection}{\large}
\setkomafont{paragraph}{\large}
\setkomafont{subparagraph}{\large}
\begin{document}
\section{Test section}
\subsection{Test section}
\subsubsection{Test section}
\paragraph{Test section}
\subparagraph{Test section}
\end{document}
memoir
For the memoir document class, the situation is analogous: is also not advisable to use titlesec (See About memoir and titlesec incompatibility) but to use the features provided by the class; in the case of the lower sectional units, the class provides the family of commands \setXheadstyle:
\documentclass[article]{memoir}
\setsecheadstyle{\LARGE\bfseries}
\setsubsecheadstyle{\Large\bfseries}
\setsubsubsecheadstyle{\large\bfseries}
\setparaheadstyle{\large\bfseries}
\setsubparaheadstyle{\large\bfseries}
\begin{document}
\section{Test section}
\subsection{Test section}
\subsubsection{Test section}
\paragraph{Test section}
\subparagraph{Test section}
\end{document}
\sffamilyto the list of corrections? – Werner Jun 13 '12 at 22:22\sffamily, as I did in the last code of my updated answer. – Gonzalo Medina Jun 13 '12 at 22:43\setkomafontfor KOMA-script classes, which seems to point slightly towards what I'm looking for. Is there such thing as\getkomafontas well, or\applykomafontor the like? Because I'm making my own, more flexible header command. – Egor Hans Dec 04 '17 at 08:44